Replace deprecated assertDictContainsSubset
The method is deprecated since Python 3.2[1] and shows the following DeprecationWarning. /usr/lib/python3.9/unittest/case.py:1134: DeprecationWarning: assertDictContainsSubset is deprecated warnings.warn('assertDictContainsSubset is deprecated', [1] https://docs.python.org/3/whatsnew/3.2.html#unittest Closes-Bug: #1938103 Change-Id: I58c9a58266f6b0e388cd60b012636fedd85a4262
This commit is contained in:
parent
fa55888550
commit
7259eca917
@ -249,8 +249,8 @@ class TestMetadefsControllers(base.IsolatedUnitTest):
|
||||
for output_log, event in zip(output_logs, expected_events):
|
||||
self.assertEqual('INFO', output_log['notification_type'])
|
||||
self.assertEqual(event['type'], output_log['event_type'])
|
||||
self.assertDictContainsSubset(event['payload'],
|
||||
output_log['payload'])
|
||||
self.assertLessEqual(event['payload'].items(),
|
||||
output_log['payload'].items())
|
||||
self.notifier.log = []
|
||||
|
||||
def test_namespace_index(self):
|
||||
|
Loading…
Reference in New Issue
Block a user