def test_record_result_data_no_case_name(self): influxdb = InfluxdbDispatcher(None, self.yardstick_conf) self.assertEqual(influxdb.record_result_data(self.data2), -1)
def test_record_result_data_no_target(self): influxdb = InfluxdbDispatcher(None, self.yardstick_conf) influxdb.target = '' self.assertEqual(influxdb.record_result_data(self.data1), -1)
def test_record_result_data(self, mock_requests): type(mock_requests.post.return_value).status_code = 204 influxdb = InfluxdbDispatcher(None, self.yardstick_conf) self.assertEqual(influxdb.record_result_data(self.data1), 0) self.assertEqual(influxdb.record_result_data(self.data2), 0) self.assertEqual(influxdb.flush_result_data(), 0)
def test_record_result_data(self, mock_requests): type(mock_requests.post.return_value).status_code = 204 influxdb = InfluxdbDispatcher(None) self.assertEqual(influxdb.record_result_data(self.data1), 0) self.assertEqual(influxdb.record_result_data(self.data2), 0) self.assertEqual(influxdb.flush_result_data(), 0)
def test_record_result_data_no_case_name(self): influxdb = InfluxdbDispatcher(None) self.assertEqual(influxdb.record_result_data(self.data2), -1)
def test_record_result_data_no_target(self): influxdb = InfluxdbDispatcher(None) influxdb.target = '' self.assertEqual(influxdb.record_result_data(self.data1), -1)