aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin André <m.andre@redhat.com>2017-07-05 10:34:22 +0200
committerMartin André <m.andre@redhat.com>2017-07-05 10:34:22 +0200
commitd933150aec373ca6f6be62962923d93cb5e09e8b (patch)
treeab1fe7b1e7ee0ce8ddc5987680e793a3943bd16e
parent78bbd8fd0d54c8203ced7d81c32bdd421849ceee (diff)
downloadkolla-d933150aec373ca6f6be62962923d93cb5e09e8b.tar.gz
kolla-d933150aec373ca6f6be62962923d93cb5e09e8b.zip
Fix mock order
The mocks were in the wrong order. The only reason the tests were passing so far was because the calls to mocks were not checked, the mocks were only used to prevent the tested function to make calls to actual resources. Change-Id: If7ea23ac20e3a0d584e02e31d9d60ba914efa8aa
-rw-r--r--kolla/tests/test_build.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/kolla/tests/test_build.py b/kolla/tests/test_build.py
index 8ace0622c..b503222b4 100644
--- a/kolla/tests/test_build.py
+++ b/kolla/tests/test_build.py
@@ -162,11 +162,11 @@ class TasksTest(base.TestCase):
self.assertFalse(builder.success)
+ @mock.patch('os.utime')
+ @mock.patch('shutil.copyfile')
+ @mock.patch('shutil.rmtree')
@mock.patch('docker.APIClient')
@mock.patch('requests.get')
- @mock.patch('shutil.rmtree')
- @mock.patch('shutil.copyfile')
- @mock.patch('os.utime')
def test_process_source(self, mock_get, mock_client,
mock_rmtree, mock_copyfile, mock_utime):
for source in [{'source': 'http://fake/source1', 'type': 'url',