Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions pytest_invenio/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def _celery_config():
CELERY_TASK_ALWAYS_EAGER=True,
CELERY_CACHE_BACKEND="memory",
CELERY_TASK_EAGER_PROPAGATES_EXCEPTIONS=True,
CELERY_RESULT_BACKEND="cache",
CELERY_RESULT_BACKEND="rpc://",
)

try:
Expand Down Expand Up @@ -180,7 +180,7 @@ def search_hosts():


@pytest.fixture(scope="module")
def app_config(db_uri, broker_uri, celery_config_ext, search_hosts):
def app_config(db_uri, broker_uri, celery_config_ext, search_hosts, cache_uri):
"""Application configuration fixture.

Scope: module
Expand Down Expand Up @@ -230,6 +230,10 @@ def app_config(app_config):
),
# Broker configuration
BROKER_URL=broker_uri,
CELERY_BROKER_URL=broker_uri, # For Celery 4
# Cache configuration
CACHE_REDIS_URL=cache_uri,
ACCOUNTS_SESSION_REDIS_URL=cache_uri,
# Disable Flask-DebugToolbar if installed.
DEBUG_TB_ENABLED=False,
# Disable mail sending.
Expand Down