lib: add configurable avatars, set to none mode for tests

This commit is contained in:
Jens Langhammer
2020-10-22 13:55:37 +02:00
parent 7b5a0964b2
commit bbcf58705f
6 changed files with 26 additions and 32 deletions

View File

@ -1,6 +1,8 @@
"""Integrate ./manage.py test with pytest"""
from django.conf import settings
from passbook.lib.config import CONFIG
class PytestTestRunner:
"""Runs pytest to discover and run tests."""
@ -11,6 +13,7 @@ class PytestTestRunner:
self.keepdb = keepdb
settings.TEST = True
settings.CELERY_TASK_ALWAYS_EAGER = True
CONFIG.raw.get("passbook")["avatars"] = "none"
def run_tests(self, test_labels):
"""Run pytest and return the exitcode.