summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>2018-06-29 12:01:31 +0100
committerRodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>2018-06-29 15:17:24 +0000
commit1aa384c34e1fe572dedd23412292a81a481ec4a3 (patch)
tree0fa95416bc6f97ca17f94f5b5ab23a728633af3e
parentd2151e7ce5d6d2a095788e1359a271606b88db21 (diff)
Cleanup GetDataDbClientTestCase unit tests
Removed unneeded output. JIRA: YARDSTICK-1268 Change-Id: I2e9130e863ba915feeb52f54fc901898b1c8f792 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
-rw-r--r--yardstick/tests/unit/apiserver/utils/test_influx.py8
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()