diff options
author | 2017-09-05 09:10:40 +0000 | |
---|---|---|
committer | 2017-09-05 09:10:40 +0000 | |
commit | 6df95384eb26cdca150f7010bcead9e93d8aac4a (patch) | |
tree | e02bb7865765d039e695eaea52d69b62a81739fa /functest/tests | |
parent | 82b5b5c13ed5b08ff7191d0d1dcddfc4bd99f0c7 (diff) | |
parent | 48ab10bb0a1ae754309e0810b3d85acdf70c8225 (diff) |
Merge "Create results/tempest dir for refstack config"
Diffstat (limited to 'functest/tests')
-rw-r--r-- | functest/tests/unit/openstack/tempest/test_conf_utils.py | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/functest/tests/unit/openstack/tempest/test_conf_utils.py b/functest/tests/unit/openstack/tempest/test_conf_utils.py index 77558086..22017a7a 100644 --- a/functest/tests/unit/openstack/tempest/test_conf_utils.py +++ b/functest/tests/unit/openstack/tempest/test_conf_utils.py @@ -170,9 +170,23 @@ class OSTempestConfUtilsTesting(unittest.TestCase): def test_backup_tempest_config_default(self): with mock.patch('functest.opnfv_tests.openstack.tempest.' - 'conf_utils.shutil.copyfile') as m1: + 'conf_utils.os.path.exists', + return_value=False), \ + mock.patch('functest.opnfv_tests.openstack.tempest.' + 'conf_utils.os.makedirs') as m1, \ + mock.patch('functest.opnfv_tests.openstack.tempest.' + 'conf_utils.shutil.copyfile') as m2: conf_utils.backup_tempest_config('test_conf_file') self.assertTrue(m1.called) + self.assertTrue(m2.called) + + with mock.patch('functest.opnfv_tests.openstack.tempest.' + 'conf_utils.os.path.exists', + return_value=True), \ + mock.patch('functest.opnfv_tests.openstack.tempest.' + 'conf_utils.shutil.copyfile') as m2: + conf_utils.backup_tempest_config('test_conf_file') + self.assertTrue(m2.called) def test_configure_tempest_default(self): with mock.patch('functest.opnfv_tests.openstack.tempest.' |