def test_do_cache_multi(flowmachine_connect): """ Test that a query containing subqueries can be cached. """ hl1 = ModalLocation(daily_location("2016-01-01"), daily_location("2016-01-02")) hl1._db_store_cache_metadata() assert cache_table_exists(flowmachine_connect, hl1.md5)
def test_do_cache_multi(flowmachine_connect): """ Test that a query containing subqueries can be cached. """ hl1 = ModalLocation(daily_location("2016-01-01"), daily_location("2016-01-02")) hl1._db_store_cache_metadata() in_cache = bool( flowmachine_connect.fetch( f"SELECT * FROM cache.cached WHERE query_id='{hl1.md5}'")) assert in_cache