From: Kefu Chai Date: Sun, 5 Apr 2020 12:50:11 +0000 (+0800) Subject: qa/tasks/cephfs: use assertCountEqual if PY3 X-Git-Tag: v15.2.4~42^2~57 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9cacb71e5a405aeb26a76bd924ef49f33990debe;p=ceph.git qa/tasks/cephfs: use assertCountEqual if PY3 assertItemsEqual is renamed to assertCountEqual in Python3. Signed-off-by: Kefu Chai (cherry picked from commit 21d6c5a95b4a6873bc8f35a74e3f48436bd96264) --- diff --git a/qa/tasks/cephfs/test_volume_client.py b/qa/tasks/cephfs/test_volume_client.py index fb67032a3cd2..73bcbdcd04cc 100644 --- a/qa/tasks/cephfs/test_volume_client.py +++ b/qa/tasks/cephfs/test_volume_client.py @@ -658,10 +658,10 @@ vc.disconnect() # Check the list of authorized IDs and their access levels. if self.py_version == 'python3': expected_result = [('guest1', 'rw'), ('guest2', 'r')] + self.assertCountEqual(str(expected_result), auths) else: expected_result = [(u'guest1', u'rw'), (u'guest2', u'r')] - - self.assertItemsEqual(str(expected_result), auths) + self.assertItemsEqual(str(expected_result), auths) # Disallow both the auth IDs' access to the volume. auths = self._volume_client_python(volumeclient_mount, dedent("""