summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2016-02-29 19:21:41 +0000
committerGerrit Code Review <review@openstack.org>2016-02-29 19:21:41 +0000
commit22a03fd475d1807dee41b24291862f1bdc361273 (patch)
tree8278ad7e6f34a4beb20ad26ecb107d0d0f609b78
parent6aaa6f2f8c09a9af98bf6f340c3a9ee8203cca5d (diff)
parentd28ccb37ff5d9e310c4e6d4409f9d642423dd260 (diff)
downloadpython-glanceclient-2.0.0.tar.gz
Merge "Test: use assert_has_calls() instead"2.0.0
-rw-r--r--glanceclient/tests/unit/test_shell.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/glanceclient/tests/unit/test_shell.py b/glanceclient/tests/unit/test_shell.py
index 7b3e79e..2a33dc0 100644
--- a/glanceclient/tests/unit/test_shell.py
+++ b/glanceclient/tests/unit/test_shell.py
@@ -686,9 +686,12 @@ class ShellCacheSchemaTest(testutils.TestCase):
self.shell._cache_schemas(self._make_args(options),
client, home_dir=self.cache_dir)
- os.path.exists.assert_any_call(self.prefix_path)
- os.path.exists.assert_any_call(self.cache_files[0])
- os.path.exists.assert_any_call(self.cache_files[1])
+ exists_mock.assert_has_calls([
+ mock.call(self.prefix_path),
+ mock.call(self.cache_files[0]),
+ mock.call(self.cache_files[1]),
+ mock.call(self.cache_files[2])
+ ])
self.assertEqual(4, exists_mock.call_count)
self.assertEqual(0, open.mock_calls.__len__())