diff options
author | Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com> | 2018-07-03 16:24:24 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2018-07-03 16:24:24 +0000 |
commit | 9b1899199dab5094374b8beda850af92e6f55491 (patch) | |
tree | 10b8a9c0051462324301d6ecc23309d3ae5abd52 | |
parent | 494810c4d113088069d6d2746bb40f988c583ef3 (diff) | |
parent | 1aa384c34e1fe572dedd23412292a81a481ec4a3 (diff) |
Merge "Cleanup GetDataDbClientTestCase unit tests"
-rw-r--r-- | yardstick/tests/unit/apiserver/utils/test_influx.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/yardstick/tests/unit/apiserver/utils/test_influx.py b/yardstick/tests/unit/apiserver/utils/test_influx.py index 95105d8ae..6021d35df 100644 --- a/yardstick/tests/unit/apiserver/utils/test_influx.py +++ b/yardstick/tests/unit/apiserver/utils/test_influx.py @@ -31,15 +31,17 @@ class GetDataDbClientTestCase(base.BaseUnitTestCase): _mock_parser.read.assert_called_once_with(constants.CONF_FILE) mock_get_client.assert_called_once_with(_mock_parser) + @mock.patch.object(influx.logger, 'error') @mock.patch.object(influx, '_get_influxdb_client', return_value='fake_client') @mock.patch.object(influx.ConfigParser, 'ConfigParser') - def test_get_data_db_client_parsing_error(self, mock_parser, - mock_get_client): + def test_get_data_db_client_parsing_error( + self, mock_parser, mock_get_client, *args): _mock_parser = mock.Mock() mock_parser.return_value = _mock_parser mock_parser.NoOptionError = configparser.NoOptionError - mock_get_client.side_effect = configparser.NoOptionError('option', 'section') + mock_get_client.side_effect = configparser.NoOptionError('option', + 'section') with self.assertRaises(configparser.NoOptionError): influx.get_data_db_client() |