From f2a9d2955b12c06d855fa5e09315eb86e7e49064 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Sun, 5 Apr 2020 20:50:11 +0800 Subject: [PATCH] qa/tasks/cephfs: use assertCountEqual if PY3 assertItemsEqual is renamed to assertCountEqual in Python3. Signed-off-by: Kefu Chai (cherry picked from commit 21d6c5a95b4a6873bc8f35a74e3f48436bd96264) --- qa/tasks/cephfs/test_volume_client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qa/tasks/cephfs/test_volume_client.py b/qa/tasks/cephfs/test_volume_client.py index e31145397521d..189d080ec17d8 100644 --- a/qa/tasks/cephfs/test_volume_client.py +++ b/qa/tasks/cephfs/test_volume_client.py @@ -688,10 +688,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(""" -- 2.39.5