From: Rodolfo Alonso Hernandez Date: Fri, 29 Jun 2018 11:01:31 +0000 (+0100) Subject: Cleanup GetDataDbClientTestCase unit tests X-Git-Tag: opnfv-7.0.0~208^2 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F21%2F59321%2F2;p=yardstick.git Cleanup GetDataDbClientTestCase unit tests Removed unneeded output. JIRA: YARDSTICK-1268 Change-Id: I2e9130e863ba915feeb52f54fc901898b1c8f792 Signed-off-by: Rodolfo Alonso Hernandez --- 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()