summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Kajinami <tkajinam@redhat.com>2021-09-05 00:56:38 +0900
committerTakashi Kajinami <tkajinam@redhat.com>2021-09-05 00:56:38 +0900
commitcff9c266c05ebfc13f4917e1646e5dedbe371cc2 (patch)
treebdfedc7c4448dcf475645bfb64084a26af75347c
parent2f047b15957308e84dcb72baee3415b8bf5a470a (diff)
downloadpython-neutronclient-cff9c266c05ebfc13f4917e1646e5dedbe371cc2.tar.gz
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: I1d0ee6c77476707a7e4fe4fbf2b979bf34550d05
-rw-r--r--neutronclient/tests/unit/test_shell.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/neutronclient/tests/unit/test_shell.py b/neutronclient/tests/unit/test_shell.py
index 9dc2faa..04e8140 100644
--- a/neutronclient/tests/unit/test_shell.py
+++ b/neutronclient/tests/unit/test_shell.py
@@ -357,10 +357,10 @@ class ShellTest(testtools.TestCase):
self.useFixture(fixtures.MockPatchObject(openstack_shell,
'COMMANDS', None))
openstack_shell.NeutronShell('2.0')
- self.assertDictContainsSubset(
+ self.assertLessEqual(
{'net-create': network.CreateNetwork,
'net-delete': network.DeleteNetwork,
'net-list': network.ListNetwork,
'net-show': network.ShowNetwork,
- 'net-update': network.UpdateNetwork},
- openstack_shell.COMMANDS['2.0'])
+ 'net-update': network.UpdateNetwork}.items(),
+ openstack_shell.COMMANDS['2.0'].items())