Skip to content
Snippets Groups Projects
Commit 81c859b5 authored by Thomas Goirand's avatar Thomas Goirand
Browse files

Add remove-broken-test.patch.

parent b2081b43
No related branches found
No related tags found
No related merge requests found
......@@ -11,6 +11,7 @@ influxdb-python (5.3.1-1) experimental; urgency=medium
* Team upload.
* Add python3-msgpack as (build-)depends.
* Refreshed skip-precision-test.patch.
* Add remove-broken-test.patch.
-- Thomas Goirand <zigo@debian.org> Tue, 23 Mar 2021 09:54:46 +0100
......
Description: Remove broken test
This test is broken because of a deprecation warning in pandas.
Author: Thomas Goirand <zigo@debian.org>
Forwarded: no
Last-Update: 2021-03-23
--- influxdb-python-5.3.1.orig/influxdb/tests/dataframe_client_test.py
+++ influxdb-python-5.3.1/influxdb/tests/dataframe_client_test.py
@@ -1210,38 +1210,6 @@ class TestDataFrameClient(unittest.TestC
tag_columns=['tag_one', 'tag_two'])
self.assertEqual(m.last_request.body, expected)
- def test_write_points_from_dataframe_with_tags_and_nan_json(self):
- """Test write points from json with NaN lines and tags."""
- now = pd.Timestamp('1970-01-01 00:00+00:00')
- dataframe = pd.DataFrame(data=[['blue', 1, "1", 1, np.inf],
- ['red', 0, "2", 2, np.nan]],
- index=[now, now + timedelta(hours=1)],
- columns=["tag_one", "tag_two", "column_one",
- "column_two", "column_three"])
- expected = (
- b"foo,tag_one=blue,tag_two=1 "
- b"column_one=\"1\",column_two=1i "
- b"0\n"
- b"foo,tag_one=red,tag_two=0 "
- b"column_one=\"2\",column_two=2i "
- b"3600000000000\n"
- )
-
- with requests_mock.Mocker() as m:
- m.register_uri(requests_mock.POST,
- "http://localhost:8086/write",
- status_code=204)
-
- cli = DataFrameClient(database='db')
-
- cli.write_points(dataframe, 'foo', protocol='json',
- tag_columns=['tag_one', 'tag_two'])
- self.assertEqual(m.last_request.body, expected)
-
- cli.write_points(dataframe, 'foo', tags=None, protocol='json',
- tag_columns=['tag_one', 'tag_two'])
- self.assertEqual(m.last_request.body, expected)
-
def test_query_custom_index(self):
"""Test query with custom indexes."""
data = {
skip-precision-test.patch
remove-broken-test.patch
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment