From d933150aec373ca6f6be62962923d93cb5e09e8b Mon Sep 17 00:00:00 2001 From: Martin André Date: Wed, 5 Jul 2017 10:34:22 +0200 Subject: 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 --- kolla/tests/test_build.py | 6 +++--- 1 file 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', -- cgit v1.2.3