Skip to content

Commit 670fdea

Browse files
Grégory Starckaviau
Grégory Starck
authored and
aviau
committed
client_test: Fixed some things:
1) cli.query() which now returns a ResultSet, which must be list()ed in order to obtain the list of series. 2) assertListEqual instead of assertDictEqual for a list result. TODO: but now we have to fix the results format.
1 parent c2f2284 commit 670fdea

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

tests/influxdb/client_test.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -265,12 +265,13 @@ def test_query(self):
265265
"http://localhost:8086/query",
266266
text=example_response
267267
)
268-
self.assertDictEqual(
269-
self.cli.query('select * from foo'),
270-
{'cpu_load_short':
268+
rs = self.cli.query('select * from foo')
269+
self.assertListEqual(
270+
list(rs),
271+
[{'cpu_load_short':
271272
[{'value': 0.64, 'time': '2009-11-10T23:00:00Z'}],
272273
'sdfsdfsdf':
273-
[{'value': 0.64, 'time': '2009-11-10T23:00:00Z'}]}
274+
[{'value': 0.64, 'time': '2009-11-10T23:00:00Z'}]}]
274275
)
275276

276277
@unittest.skip('Not implemented for 0.9')

0 commit comments

Comments
 (0)