'Test multiquyer into df for TestDataFrameClient object.'

def test_multiquery_into_dataframe(self):

    data = {u'results': [{u'series': [{u'name': u'cpu_load_short', u'columns': [u'time', u'value'], u'values': [[u'2015-01-29T21:55:43.702900257Z', 0.55], [u'2015-01-29T21:55:43.702900257Z', 23422], [u'2015-06-11T20:46:02Z', 0.64]]}]}, {u'series': [{u'name': u'cpu_load_short', u'columns': [u'time', u'count'], u'values': [[u'1970-01-01T00:00:00Z', 3]]}]}]}
    pd1 = pd.DataFrame([[0.55], [23422.0], [0.64]], columns=[u'value'], index=pd.to_datetime([u'2015-01-29    21:55:43.702900257+0000', u'2015-01-29    21:55:43.702900257+0000', u'2015-06-11    20:46:02+0000'])).tz_localize(u'UTC')
    pd2 = pd.DataFrame([[3]], columns=[u'count'], index=pd.to_datetime([u'1970-01-01    00:00:00+00:00'])).tz_localize(u'UTC')
    expected = [{u'cpu_load_short': pd1}, {u'cpu_load_short': pd2}]
    cli = DataFrameClient(u'host', 8086, u'username', u'password', u'db')
    iql = u"SELECT    value    FROM    cpu_load_short    WHERE    region='us-west';SELECT    count(value)    FROM    cpu_load_short    WHERE    region='us-west'"
    with _mocked_session(cli, u'GET', 200, data):
        result = cli.query(iql)
        for (r, e) in zip(result, expected):
            for k in e:
                assert_frame_equal(e[k], r[k])
