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. Credits to [5]. [1] - https://bugs.python.org/issue17866 [2] - https://hg.python.org/cpython/rev/d9921cb6e3cd [3] - testing-cabal/testtools#286 [4] - testing-cabal/testtools#277 [5] - https://review.opendev.org/#/c/732393/ Change-Id: Ib1db7694a8f0f59d8762b02acbb4ef16e5176098
This commit is contained in:
parent
7d03b2b2f4
commit
1fe8df2bc8
@ -35,7 +35,7 @@ class FedKerbLoadingTests(test_utils.TestCase):
|
||||
'mutual-auth',
|
||||
]
|
||||
|
||||
self.assertItemsEqual(allowed_opts, opts)
|
||||
self.assertCountEqual(allowed_opts, opts)
|
||||
|
||||
def create(self, **kwargs):
|
||||
loader = loading.get_plugin_loader('v3fedkerb')
|
||||
|
@ -32,4 +32,4 @@ class KerberosLoadingTests(test_utils.TestCase):
|
||||
'mutual-auth',
|
||||
]
|
||||
|
||||
self.assertItemsEqual(allowed_opts, opts)
|
||||
self.assertCountEqual(allowed_opts, opts)
|
||||
|
Loading…
Reference in New Issue
Block a user