def memcached_cache(event_loop): cache = MemcachedCache(namespace="test", loop=event_loop) cache.set_policy(DefaultPolicy) yield cache event_loop.run_until_complete(cache.delete(pytest.KEY)) event_loop.run_until_complete(cache.delete(pytest.KEY_1))
def memcached_cache(event_loop): cache = MemcachedCache(namespace="test") yield cache event_loop.run_until_complete(cache.delete(pytest.KEY)) event_loop.run_until_complete(cache.delete(pytest.KEY_1)) event_loop.run_until_complete(cache.delete(pytest.KEY + '-lock')) event_loop.run_until_complete(cache.close())