def test_default_caches(self): assert caches.get_config() == { "default": { "cache": "aiocache.SimpleMemoryCache", "serializer": {"class": "aiocache.serializers.NullSerializer"}, } }
def test_default_caches(self): assert caches.get_config() == { 'default': { 'cache': "aiocache.SimpleMemoryCache", 'serializer': { 'class': "aiocache.serializers.NullSerializer" } } }
def test_add_new_entry(self): alias = "memory" config = { "cache": "aiocache.SimpleMemoryCache", "serializer": {"class": "aiocache.serializers.StringSerializer"}, } caches.add(alias, config) assert caches.get_config()[alias] == config
async def stop_plugins(app): cache_config = caches.get_config() for cache_name in cache_config: await caches.get(cache_name).close()