Beispiel #1
0
async def test_flush(rat_cache_fx: RatCache):
    rat_cache_fx.by_name = {"s": 12}
    rat_cache_fx.by_uuid = {uuid4(): 12}

    rat_cache_fx.flush()
    assert {} == rat_cache_fx.by_uuid
    assert {} == rat_cache_fx.by_name
Beispiel #2
0
async def test_by_name_setter_garbage(rat_cache_fx: RatCache, garbage):
    with pytest.raises(TypeError):
        rat_cache_fx.by_name = garbage