diff options
author | valentin boucher <valentin.boucher@orange.com> | 2017-06-13 08:20:56 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2017-06-13 08:20:56 +0000 |
commit | fb3ef61a03cdf2fb938d771e9d23f6435cff240f (patch) | |
tree | 9bf4162fcb7aca8aa40fde7cb58da6e254f49239 /functest/tests/unit/vnf/ims/test_cloudify_ims.py | |
parent | 7db24e2b6994487d225c150a20f3a91d7bf12588 (diff) | |
parent | 58667cba215c2cb999d6bcaf891980bda4325b42 (diff) |
Merge "Refactor core VNF class"
Diffstat (limited to 'functest/tests/unit/vnf/ims/test_cloudify_ims.py')
-rw-r--r-- | functest/tests/unit/vnf/ims/test_cloudify_ims.py | 31 |
1 files changed, 1 insertions, 30 deletions
diff --git a/functest/tests/unit/vnf/ims/test_cloudify_ims.py b/functest/tests/unit/vnf/ims/test_cloudify_ims.py index c3c04e1d..2156a122 100644 --- a/functest/tests/unit/vnf/ims/test_cloudify_ims.py +++ b/functest/tests/unit/vnf/ims/test_cloudify_ims.py @@ -69,7 +69,7 @@ class CloudifyImsTesting(unittest.TestCase): mock.patch('functest.opnfv_tests.vnf.ims.cloudify_ims.' 'os_utils.get_image_id', return_value=''), \ - mock.patch('functest.opnfv_tests.vnf.ims.cloudify_ims.' + mock.patch('functest.opnfv_tests.vnf.ims.cloudify_ims.os_utils.' 'download_and_add_image_on_glance') as m, \ self.assertRaises(Exception) as context: self.ims_vnf.deploy_orchestrator() @@ -458,35 +458,6 @@ class CloudifyImsTesting(unittest.TestCase): {'status': 'PASS', 'result': 'vims_test_result'}) - def test_download_and_add_image_on_glance_incorrect_url(self): - with mock.patch('functest.opnfv_tests.vnf.ims.cloudify_ims.' - 'os.makedirs'), \ - mock.patch('functest.opnfv_tests.vnf.ims.cloudify_ims.' - 'ft_utils.download_url', - return_value=False): - resp = cloudify_ims.download_and_add_image_on_glance(self. - glance_client, - 'image_name', - 'http://url', - 'data_dir') - self.assertEqual(resp, False) - - def test_download_and_add_image_on_glance_image_creation_failure(self): - with mock.patch('functest.opnfv_tests.vnf.ims.cloudify_ims.' - 'os.makedirs'), \ - mock.patch('functest.opnfv_tests.vnf.ims.cloudify_ims.' - 'ft_utils.download_url', - return_value=True), \ - mock.patch('functest.opnfv_tests.vnf.ims.cloudify_ims.' - 'os_utils.create_glance_image', - return_value=''): - resp = cloudify_ims.download_and_add_image_on_glance(self. - glance_client, - 'image_name', - 'http://url', - 'data_dir') - self.assertEqual(resp, False) - if __name__ == "__main__": logging.disable(logging.CRITICAL) |