cic-internal-integration/apps/cic-ussd/tests/fixtures/cache.py

20 lines
437 B
Python
Raw Normal View History

2021-08-06 18:29:01 +02:00
# standard imports
# external imports
import pytest
from pytest_redis import factories
2021-08-06 18:29:01 +02:00
# local imports
from cic_ussd.cache import Cache
from cic_ussd.session.ussd_session import UssdSession
redis_test_proc = factories.redis_proc()
redis_db = factories.redisdb('redis_test_proc', decode=True)
2021-08-06 18:29:01 +02:00
@pytest.fixture(scope='function')
def init_cache(redis_db):
Cache.store = redis_db
UssdSession.store = redis_db
return redis_db