From 6860f1187c859d87fdc7e0c8822d3057ad09082f Mon Sep 17 00:00:00 2001 From: Yuming Zhu Date: Jun 22 2017 08:58:36 +0000 Subject: add patch for os.makedirs to avoid creating dir --- diff --git a/tests/test_lib_py2only/test_restart_tasks.py b/tests/test_lib_py2only/test_restart_tasks.py index 7cf56a0..4090c45 100644 --- a/tests/test_lib_py2only/test_restart_tasks.py +++ b/tests/test_lib_py2only/test_restart_tasks.py @@ -11,6 +11,7 @@ class TestRestartTask(unittest.TestCase): self.options = mock.MagicMock() self.manager = mock.MagicMock() self.safe_rmtree = mock.patch('koji.tasks.safe_rmtree').start() + self.os_mkdir = mock.patch('os.makedirs').start() def tearDown(self): mock.patch.stopall() @@ -48,6 +49,7 @@ class TestRestartVerifyTask(unittest.TestCase): self.options = mock.MagicMock() self.manager = mock.MagicMock() self.safe_rmtree = mock.patch('koji.tasks.safe_rmtree').start() + self.os_mkdir = mock.patch('os.makedirs').start() def tearDown(self): mock.patch.stopall() @@ -134,6 +136,7 @@ class TestRestartHostsTask(unittest.TestCase): self.options = mock.MagicMock() self.manager = mock.MagicMock() self.safe_rmtree = mock.patch('koji.tasks.safe_rmtree').start() + self.os_mkdir = mock.patch('os.makedirs').start() def tearDown(self): mock.patch.stopall()