diff --git a/cinderclient/tests/v1/fakes.py b/cinderclient/tests/v1/fakes.py index 0540c81b4..111683ad2 100644 --- a/cinderclient/tests/v1/fakes.py +++ b/cinderclient/tests/v1/fakes.py @@ -346,7 +346,7 @@ class FakeHTTPClient(base_client.HTTPClient): assert 'host' in body[action] assert 'force_host_copy' in body[action] elif action == 'os-update_readonly_flag': - assert body[action].keys() == ['readonly'] + assert list(body[action]) == ['readonly'] else: raise AssertionError("Unexpected action: %s" % action) return (resp, {}, _body) diff --git a/cinderclient/tests/v1/test_shell.py b/cinderclient/tests/v1/test_shell.py index 3b431b947..432059f21 100644 --- a/cinderclient/tests/v1/test_shell.py +++ b/cinderclient/tests/v1/test_shell.py @@ -286,13 +286,13 @@ class ShellTest(utils.TestCase): def test_snapshot_metadata_unset_dict(self): self.run_command('snapshot-metadata 1234 unset key1=val1 key2=val2') - self.assert_called('DELETE', '/snapshots/1234/metadata/key1') - self.assert_called('DELETE', '/snapshots/1234/metadata/key2', pos=-2) + self.assert_called_anytime('DELETE', '/snapshots/1234/metadata/key1') + self.assert_called_anytime('DELETE', '/snapshots/1234/metadata/key2') def test_snapshot_metadata_unset_keys(self): self.run_command('snapshot-metadata 1234 unset key1 key2') - self.assert_called('DELETE', '/snapshots/1234/metadata/key1') - self.assert_called('DELETE', '/snapshots/1234/metadata/key2', pos=-2) + self.assert_called_anytime('DELETE', '/snapshots/1234/metadata/key1') + self.assert_called_anytime('DELETE', '/snapshots/1234/metadata/key2') def test_volume_metadata_update_all(self): self.run_command('metadata-update-all 1234 key1=val1 key2=val2') diff --git a/cinderclient/tests/v2/fakes.py b/cinderclient/tests/v2/fakes.py index 066a14cb2..5804d0f06 100644 --- a/cinderclient/tests/v2/fakes.py +++ b/cinderclient/tests/v2/fakes.py @@ -353,7 +353,7 @@ class FakeHTTPClient(base_client.HTTPClient): assert 'host' in body[action] assert 'force_host_copy' in body[action] elif action == 'os-update_readonly_flag': - assert body[action].keys() == ['readonly'] + assert list(body[action]) == ['readonly'] else: raise AssertionError("Unexpected action: %s" % action) return (resp, {}, _body) diff --git a/cinderclient/tests/v2/test_shell.py b/cinderclient/tests/v2/test_shell.py index cc29113ab..4a5c33ddf 100644 --- a/cinderclient/tests/v2/test_shell.py +++ b/cinderclient/tests/v2/test_shell.py @@ -264,13 +264,13 @@ class ShellTest(utils.TestCase): def test_snapshot_metadata_unset_dict(self): self.run_command('snapshot-metadata 1234 unset key1=val1 key2=val2') - self.assert_called('DELETE', '/snapshots/1234/metadata/key1') - self.assert_called('DELETE', '/snapshots/1234/metadata/key2', pos=-2) + self.assert_called_anytime('DELETE', '/snapshots/1234/metadata/key1') + self.assert_called_anytime('DELETE', '/snapshots/1234/metadata/key2') def test_snapshot_metadata_unset_keys(self): self.run_command('snapshot-metadata 1234 unset key1 key2') - self.assert_called('DELETE', '/snapshots/1234/metadata/key1') - self.assert_called('DELETE', '/snapshots/1234/metadata/key2', pos=-2) + self.assert_called_anytime('DELETE', '/snapshots/1234/metadata/key1') + self.assert_called_anytime('DELETE', '/snapshots/1234/metadata/key2') def test_volume_metadata_update_all(self): self.run_command('metadata-update-all 1234 key1=val1 key2=val2')