diff options
author | Jose Lausuch <jose.lausuch@ericsson.com> | 2017-02-03 14:38:38 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2017-02-03 14:38:38 +0000 |
commit | 7bbd6e27f8c5d77063191945f14ef718109450b0 (patch) | |
tree | b914bfff2ec23c2f2fef0b5e7f9cf1dd41258427 /functest/tests/unit | |
parent | 256c2293f3e24bdba841b07572c85734847c73b7 (diff) | |
parent | fad072617783d6790eece5265d6e320a3ac36a81 (diff) |
Merge "Fix template error log"
Diffstat (limited to 'functest/tests/unit')
-rw-r--r-- | functest/tests/unit/utils/test_openstack_tacker.py | 10 |
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(" |