@@ -251,7 +251,7 @@ def test_multiquery_into_dataframe(self):
251
251
"series" : [
252
252
{
253
253
"name" : "cpu_load_short" ,
254
- "columns" : ["time" ,"value" ],
254
+ "columns" : ["time" , "value" ],
255
255
"values" : [
256
256
["2015-01-29T21:55:43.702900257Z" , 0.55 ],
257
257
["2015-01-29T21:55:43.702900257Z" , 23422 ],
@@ -263,7 +263,7 @@ def test_multiquery_into_dataframe(self):
263
263
"series" : [
264
264
{
265
265
"name" : "cpu_load_short" ,
266
- "columns" : ["time" ,"count" ],
266
+ "columns" : ["time" , "count" ],
267
267
"values" : [
268
268
["1970-01-01T00:00:00Z" , 3 ]
269
269
]
@@ -281,16 +281,16 @@ def test_multiquery_into_dataframe(self):
281
281
"2015-06-11 20:46:02+0000" ])).tz_localize ('UTC' )
282
282
pd2 = pd .DataFrame (
283
283
[[3 ]], columns = ['count' ],
284
- index = pd .to_datetime (["1970-01-01 00:00:00+00:00" ])). tz_localize ( 'UTC' )
285
- expected = [{ 'cpu_load_short' : pd1 }, { 'cpu_load_short' : pd2 }]
286
-
284
+ index = pd .to_datetime (["1970-01-01 00:00:00+00:00" ]))\
285
+ . tz_localize ( 'UTC' )
286
+ expected = [{ 'cpu_load_short' : pd1 }, { 'cpu_load_short' : pd2 }]
287
287
288
288
cli = DataFrameClient ('host' , 8086 , 'username' , 'password' , 'db' )
289
+ iql = "SELECT value FROM cpu_load_short WHERE region='us-west';" \
290
+ "SELECT count(value) FROM cpu_load_short WHERE region='us-west'"
289
291
with _mocked_session (cli , 'GET' , 200 , data ):
290
- result = cli .query (
291
- "SELECT value FROM cpu_load_short WHERE region='us-west';" \
292
- "SELECT count(value) FROM cpu_load_short WHERE region='us-west'" )
293
- for r ,e in zip (result , expected ):
292
+ result = cli .query (iql )
293
+ for r , e in zip (result , expected ):
294
294
for k in e :
295
295
assert_frame_equal (e [k ], r [k ])
296
296
0 commit comments