コード例 #1
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'
コード例 #2
0
def test_query_cache_status_bad(tmp_path):
    c = Cache(tmp_path)

    assert not c.query_status_exists('111-222-333')
    with pytest.raises(ServiceXException):
        c.lookup_query_status('111-222-333')