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: I17f56606eb43fba46281e9bdc08ace8727455a40
This commit is contained in:
@@ -250,7 +250,7 @@ class SubworkflowsTest(base.EngineTestCase):
|
||||
|
||||
self.assertEqual(project_id, wf1_ex.project_id)
|
||||
self.assertIsNotNone(wf1_ex.task_execution_id)
|
||||
self.assertDictContainsSubset(
|
||||
self._assert_dict_contains_subset(
|
||||
{
|
||||
'task_name': 'task2',
|
||||
'task_execution_id': wf1_ex.task_execution_id
|
||||
@@ -372,7 +372,6 @@ class SubworkflowsTest(base.EngineTestCase):
|
||||
wf2_ex = self._assert_single_item(wf_execs, name='wb1.wf2')
|
||||
|
||||
self.assertIsNotNone(wf1_ex.task_execution_id)
|
||||
self.assertDictContainsSubset({}, wf1_ex.params)
|
||||
|
||||
# Wait till workflow 'wf1' is completed.
|
||||
self.await_workflow_success(wf1_ex.id)
|
||||
|
Reference in New Issue
Block a user