diff options
| author | Martin André <m.andre@redhat.com> | 2017-07-05 10:34:22 +0200 |
|---|---|---|
| committer | Martin André <m.andre@redhat.com> | 2017-07-05 10:34:22 +0200 |
| commit | d933150aec373ca6f6be62962923d93cb5e09e8b (patch) | |
| tree | ab1fe7b1e7ee0ce8ddc5987680e793a3943bd16e /kolla/tests | |
| parent | 78bbd8fd0d54c8203ced7d81c32bdd421849ceee (diff) | |
| download | kolla-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
Diffstat (limited to 'kolla/tests')
| -rw-r--r-- | kolla/tests/test_build.py | 6 |
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', |
