'Test query for multiple time series.'

def test_query_multiple_time_series(self):

    data = [{'name': 'series1', 'columns': ['time', 'mean', 'min', 'max', 'stddev'], 'points': [[0, 323048, 323048, 323048, 0]]}, {'name': 'series2', 'columns': ['time', 'mean', 'min', 'max', 'stddev'], 'points': [[0, (-2.8233), (-2.8503), (-2.7832), 0.0173]]}, {'name': 'series3', 'columns': ['time', 'mean', 'min', 'max', 'stddev'], 'points': [[0, (-0.0122), (-0.0122), (-0.0122), 0]]}]
    dataframes = {'series1': pd.DataFrame(data=[[323048, 323048, 323048, 0]], index=pd.to_datetime([0], unit='s', utc=True), columns=['mean', 'min', 'max', 'stddev']), 'series2': pd.DataFrame(data=[[(-2.8233), (-2.8503), (-2.7832), 0.0173]], index=pd.to_datetime([0], unit='s', utc=True), columns=['mean', 'min', 'max', 'stddev']), 'series3': pd.DataFrame(data=[[(-0.0122), (-0.0122), (-0.0122), 0]], index=pd.to_datetime([0], unit='s', utc=True), columns=['mean', 'min', 'max', 'stddev'])}
    with _mocked_session('get', 200, data):
        cli = DataFrameClient('host', 8086, 'username', 'password', 'db')
        result = cli.query('select    mean(value),    min(value),    max(value),\n                                                                stddev(value)    from    series1,    series2,    series3')
        self.assertEqual(dataframes.keys(), result.keys())
        for key in dataframes.keys():
            assert_frame_equal(dataframes[key], result[key])
