Exemplo n.º 1
0
def test_ic_query_cache_status(tmp_path):
    'Query status should be cached and accessed *during* a query'
    c = Cache(tmp_path)
    info = {'request_id': '111-222-333', 'key': 'bogus'}
    c.set_query_status(info)
    with ignore_cache():
        info1 = c.lookup_query_status('111-222-333')
        assert info1['key'] == 'bogus'
Exemplo n.º 2
0
def test_query_cache_status(tmp_path):
    c = Cache(tmp_path)

    info = {'request_id': '111-222-333', 'key': 'bogus'}
    c.set_query_status(info)
    assert c.query_status_exists('111-222-333')
    info1 = c.lookup_query_status('111-222-333')
    assert info1['key'] == 'bogus'