| 1 |
Description: Remove broken test |
| 2 |
This test is broken because of a deprecation warning in pandas. |
| 3 |
Author: Thomas Goirand <[email protected]> |
| 4 |
Forwarded: no, project is archived |
| 5 |
Last-Update: 2021-03-23 |
| 6 |
|
| 7 |
--- influxdb-python-5.3.1.orig/influxdb/tests/dataframe_client_test.py |
| 8 |
+++ influxdb-python-5.3.1/influxdb/tests/dataframe_client_test.py |
| 9 |
@@ -1210,38 +1210,6 @@ class TestDataFrameClient(unittest.TestC |
| 10 |
tag_columns=['tag_one', 'tag_two']) |
| 11 |
self.assertEqual(m.last_request.body, expected) |
| 12 |
|
| 13 |
- def test_write_points_from_dataframe_with_tags_and_nan_json(self): |
| 14 |
- """Test write points from json with NaN lines and tags.""" |
| 15 |
- now = pd.Timestamp('1970-01-01 00:00+00:00') |
| 16 |
- dataframe = pd.DataFrame(data=[['blue', 1, "1", 1, np.inf], |
| 17 |
- ['red', 0, "2", 2, np.nan]], |
| 18 |
- index=[now, now + timedelta(hours=1)], |
| 19 |
- columns=["tag_one", "tag_two", "column_one", |
| 20 |
- "column_two", "column_three"]) |
| 21 |
- expected = ( |
| 22 |
- b"foo,tag_one=blue,tag_two=1 " |
| 23 |
- b"column_one=\"1\",column_two=1i " |
| 24 |
- b"0\n" |
| 25 |
- b"foo,tag_one=red,tag_two=0 " |
| 26 |
- b"column_one=\"2\",column_two=2i " |
| 27 |
- b"3600000000000\n" |
| 28 |
- ) |
| 29 |
- |
| 30 |
- with requests_mock.Mocker() as m: |
| 31 |
- m.register_uri(requests_mock.POST, |
| 32 |
- "http://localhost:8086/write", |
| 33 |
- status_code=204) |
| 34 |
- |
| 35 |
- cli = DataFrameClient(database='db') |
| 36 |
- |
| 37 |
- cli.write_points(dataframe, 'foo', protocol='json', |
| 38 |
- tag_columns=['tag_one', 'tag_two']) |
| 39 |
- self.assertEqual(m.last_request.body, expected) |
| 40 |
- |
| 41 |
- cli.write_points(dataframe, 'foo', tags=None, protocol='json', |
| 42 |
- tag_columns=['tag_one', 'tag_two']) |
| 43 |
- self.assertEqual(m.last_request.body, expected) |
| 44 |
- |
| 45 |
def test_query_custom_index(self): |
| 46 |
"""Test query with custom indexes.""" |
| 47 |
data = { |