aboutsummaryrefslogtreecommitdiffstats
path: root/functest/tests/unit/utils
diff options
context:
space:
mode:
Diffstat (limited to 'functest/tests/unit/utils')
-rw-r--r--functest/tests/unit/utils/test_openstack_tacker.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/functest/tests/unit/utils/test_openstack_tacker.py b/functest/tests/unit/utils/test_openstack_tacker.py
index a8330c0e..dc717258 100644
--- a/functest/tests/unit/utils/test_openstack_tacker.py
+++ b/functest/tests/unit/utils/test_openstack_tacker.py
@@ -146,8 +146,7 @@ class OSTackerTesting(unittest.TestCase):
tosca_file=None)
self.assertEqual(resp, self.createvnfd)
- @mock.patch('functest.utils.openstack_tacker.logger.error')
- def test_create_vnfd_default(self, mock_logger_error):
+ def test_create_vnfd_default(self):
with mock.patch.object(self.tacker_client, 'create_vnfd',
return_value=self.createvnfd), \
mock.patch('__builtin__.open', mock.mock_open(read_data='1')) \
@@ -155,16 +154,15 @@ class OSTackerTesting(unittest.TestCase):
resp = openstack_tacker.create_vnfd(self.tacker_client,
tosca_file=self.tosca_file)
m.assert_called_once_with(self.tosca_file)
- mock_logger_error.assert_called_once_with('1')
self.assertEqual(resp, self.createvnfd)
- @mock.patch('functest.utils.openstack_tacker.logger.exception')
- def test_create_vnfd_exception(self, mock_logger_excep):
+ @mock.patch('functest.utils.openstack_tacker.logger.error')
+ def test_create_vnfd_exception(self, mock_logger_error):
with mock.patch.object(self.tacker_client, 'create_vnfd',
side_effect=Exception):
resp = openstack_tacker.create_vnfd(self.tacker_client,
tosca_file=self.tosca_file)
- mock_logger_excep.assert_called_once_with(test_utils.
+ mock_logger_error.assert_called_once_with(test_utils.
SubstrMatch("Error"
" [create"
"_vnfd("