#NEWLINE# def test_list_series( self ) : #NEWLINE# #INDENT# response = { #NEWLINE# #INDENT# 'results' : [ { #NEWLINE# #INDENT# 'series' : [ { #NEWLINE# #INDENT# 'columns' : [ 'host' ] , #NEWLINE# 'measurement' : 'cpu' , #NEWLINE# 'values' : [ [ 'server01' ] ] , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'columns' : [ 'host' , 'region' ] , #NEWLINE# 'measurement' : 'network' , #NEWLINE# 'values' : [ [ 'server01' , 'us-west' ] , [ 'server01' , 'us-east' ] ] , #NEWLINE# #UNINDENT# } ] , #NEWLINE# #UNINDENT# } ] , #NEWLINE# #UNINDENT# } #NEWLINE# expected = { #NEWLINE# #INDENT# 'cpu' : pd . DataFrame ( [ [ 'server01' ] ] , columns = [ 'host' ] ) , #NEWLINE# 'network' : pd . DataFrame ( [ [ 'server01' , 'us-west' ] , [ 'server01' , 'us-east' ] ] , columns = [ 'host' , 'region' ] ) , #NEWLINE# #UNINDENT# } #NEWLINE# cli = DataFrameClient ( 'host' , 8086 , 'username' , 'password' , 'db' ) #NEWLINE# with _mocked_session ( cli , 'GET' , 200 , response ) : #NEWLINE# #INDENT# series = cli . get_list_series ( ) #NEWLINE# assert_frame_equal ( series [ 'cpu' ] , expected [ 'cpu' ] ) #NEWLINE# assert_frame_equal ( cli [ 'network' ] , expected [ 'network' ] )