From 1aa384c34e1fe572dedd23412292a81a481ec4a3 Mon Sep 17 00:00:00 2001 From: Rodolfo Alonso Hernandez Date: Fri, 29 Jun 2018 12:01:31 +0100 Subject: Cleanup GetDataDbClientTestCase unit tests Removed unneeded output. JIRA: YARDSTICK-1268 Change-Id: I2e9130e863ba915feeb52f54fc901898b1c8f792 Signed-off-by: Rodolfo Alonso Hernandez --- yardstick/tests/unit/apiserver/utils/test_influx.py | 8 +++++--- 1 file 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() -- cgit 1.2.3-korg