Example #1
0
def test_time_range():
    rows = [{'Start Time': parse_time("2020/01/01"), 'End Time': parse_time("2020/01/02")},
            {'Start Time': parse_time("2019/01/01"), 'End Time': parse_time("2019/01/02")}]
    resp = QueryResponse(rows)

    assert resp.time_range().start == parse_time("2019/01/01")
    assert resp.time_range().end == parse_time("2020/01/02")
Example #2
0
def test_missing_time_range():
    rows = [{'wibble': 1}]
    resp = QueryResponse(rows)

    assert resp.time_range() is None