def test_explain(get_dataframe):
    """
    EventTableSubset.explain() method returns a string
    """

    # Usually not a critical function, so let's simply test by
    # asserting that it returns a string
    sd = EventTableSubset(start="2016-01-01", stop="2016-01-02")
    explain_string = sd.explain()
    assert isinstance(explain_string, str)
    assert isinstance(sd.explain(analyse=True), str)
def test_avoids_searching_extra_tables(get_dataframe):
    """
    EventTableSubset query doesn't look in additional partitioned tables.
    """
    sd = EventTableSubset(start="2016-01-01", stop="2016-01-02")
    explain_string = sd.explain()
    assert "calls_20160103" not in explain_string