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_uuid_setter_valid(rat_cache_fx: RatCache, rat_good_fx: Rat):
    fdict = {rat_good_fx.uuid: rat_good_fx}
    rat_cache_fx.by_uuid = fdict
    assert fdict == rat_cache_fx.by_uuid