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: Id354d9e30b6fa6f4b72116a659d16a2fb8030c87
This commit is contained in:
@@ -2575,7 +2575,7 @@ class TestListener(base.BaseAPITest):
|
||||
self.put(listener_path,
|
||||
self._build_body({'sni_container_refs': [sni_id1, sni_id2]}))
|
||||
get_listener = self.get(listener_path).json['listener']
|
||||
self.assertItemsEqual([sni_id1, sni_id2],
|
||||
self.assertCountEqual([sni_id1, sni_id2],
|
||||
get_listener.get('sni_container_refs'))
|
||||
|
||||
# TODO(johnsom) Fix this when there is a noop certificate manager
|
||||
|
||||
Reference in New Issue
Block a user