summaryrefslogtreecommitdiff
path: root/openstackclient/tests/unit/common
diff options
context:
space:
mode:
authorAlfredo Moralejo <amoralej@redhat.com>2020-06-01 16:39:15 +0200
committerAlfredo Moralejo <amoralej@redhat.com>2020-06-01 16:39:54 +0200
commita15b1addb41147415716417f385f8ee32aace64b (patch)
tree231841694067086026b82d5fb85510f4f5d46393 /openstackclient/tests/unit/common
parent533af9f1b2de40d98f69e83cdf89ecf254cf3879 (diff)
downloadpython-openstackclient-a15b1addb41147415716417f385f8ee32aace64b.tar.gz
Replace assertItemsEqual with assertCountEqual
assertItemsEqual was removed from Python's unittest.TestCase in Python 3.3 [1][2]. We have been able to use them since then, because testtools required unittest2, which still included it. With testtools removing Python 2.7 support [3][4], we will lose support for assertItemsEqual, so we should switch to use assertCountEqual. [1] - https://bugs.python.org/issue17866 [2] - https://hg.python.org/cpython/rev/d9921cb6e3cd [3] - testing-cabal/testtools#286 [4] - testing-cabal/testtools#277 Change-Id: I1ad0da8deda3a8cbec384b5a9c88860a526eb48c
Diffstat (limited to 'openstackclient/tests/unit/common')
-rw-r--r--openstackclient/tests/unit/common/test_parseractions.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/openstackclient/tests/unit/common/test_parseractions.py b/openstackclient/tests/unit/common/test_parseractions.py
index d015da43..736cd0b6 100644
--- a/openstackclient/tests/unit/common/test_parseractions.py
+++ b/openstackclient/tests/unit/common/test_parseractions.py
@@ -92,7 +92,7 @@ class TestMultiKeyValueAction(utils.TestCase):
{'req1': 'aaa', 'req2': 'bbb'},
{'req1': '', 'req2': ''},
]
- self.assertItemsEqual(expect, actual)
+ self.assertCountEqual(expect, actual)
def test_empty_required_optional(self):
self.parser.add_argument(
@@ -116,7 +116,7 @@ class TestMultiKeyValueAction(utils.TestCase):
{'req1': 'aaa', 'req2': 'bbb'},
{'req1': '', 'req2': ''},
]
- self.assertItemsEqual(expect, actual)
+ self.assertCountEqual(expect, actual)
def test_error_values_with_comma(self):
self.assertRaises(