diff options
author | 2018-03-13 01:36:40 +0000 | |
---|---|---|
committer | 2018-03-15 03:50:30 +0000 | |
commit | c9fd7ceab29ff755aa8a9ee1bcb6ab958e5e0420 (patch) | |
tree | 86910e6c608ab886264e1ff2fa388761b2078116 /functest/tests | |
parent | 370eee3b9b1b20057191aa614ddfda31f8656e8e (diff) |
Create 2 images and flavors for tempest tests
Also
1. remove the obsolete function: generate_test_accounts_file
2. Use patch mechanism to get config
Change-Id: I455ac37de71519bcaf9a51e5f1de1b9bc83b9ba6
Signed-off-by: Linda Wang <wangwulin@huawei.com>
Diffstat (limited to 'functest/tests')
-rw-r--r-- | functest/tests/unit/openstack/tempest/test_conf_utils.py | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/functest/tests/unit/openstack/tempest/test_conf_utils.py b/functest/tests/unit/openstack/tempest/test_conf_utils.py index fa53b57b1..ee22f7fc3 100644 --- a/functest/tests/unit/openstack/tempest/test_conf_utils.py +++ b/functest/tests/unit/openstack/tempest/test_conf_utils.py @@ -76,19 +76,11 @@ class OSTempestConfUtilsTesting(unittest.TestCase): # pylint: disable=unused-argument tempest_resources = tempest.TempestResourcesManager( os_creds=self.os_creds) - - setattr(config.CONF, 'tempest_use_custom_flavors', 'True') with self.assertRaises(Exception) as context: tempest_resources.create() msg = 'Failed to create flavor' self.assertTrue(msg in context.exception, msg=str(context.exception)) - setattr(config.CONF, 'tempest_use_custom_flavors', 'False') - with self.assertRaises(Exception) as context: - tempest_resources.create(use_custom_flavors=True) - msg = 'Failed to create flavor' - self.assertTrue(msg in context.exception, msg=str(context.exception)) - @staticmethod @mock.patch('functest.opnfv_tests.openstack.tempest.conf_utils' '.LOGGER.info') @@ -233,13 +225,6 @@ class OSTempestConfUtilsTesting(unittest.TestCase): 'test_conf_file', res_dir='test_dir') self.assertTrue(mock_copyfile.called) - def test_gen_test_accounts_file_def(self): - with mock.patch("__builtin__.open", mock.mock_open()), \ - mock.patch('functest.opnfv_tests.openstack.tempest.conf_utils.' - 'yaml.dump') as mock_dump: - conf_utils.generate_test_accounts_file('test_tenant_id') - self.assertTrue(mock_dump.called) - def _test_missing_param(self, params, image_id, flavor_id): with mock.patch('functest.opnfv_tests.openstack.tempest.' 'conf_utils.ConfigParser.RawConfigParser.' |