Changeset View
Changeset View
Standalone View
Standalone View
swh/web/settings/tests.py
Show First 20 Lines • Show All 77 Lines • ▼ Show 20 Lines | |||||
from .common import * # noqa | from .common import * # noqa | ||||
from .common import ALLOWED_HOSTS, LOGGING # noqa | from .common import ALLOWED_HOSTS, LOGGING # noqa | ||||
# when not running unit tests, make the webapp fetch data from memory storages | # when not running unit tests, make the webapp fetch data from memory storages | ||||
if 'pytest' not in sys.argv[0]: | if 'pytest' not in sys.argv[0]: | ||||
swh_web_config.update({ | swh_web_config.update({ | ||||
'debug': True, | 'debug': True, | ||||
'e2e_tests_mode': True | |||||
}) | }) | ||||
from swh.web.tests.data import get_tests_data, override_storages # noqa | from swh.web.tests.data import get_tests_data, override_storages # noqa | ||||
test_data = get_tests_data() | test_data = get_tests_data() | ||||
override_storages(test_data['storage'], test_data['idx_storage']) | override_storages(test_data['storage'], test_data['idx_storage']) | ||||
else: | else: | ||||
ALLOWED_HOSTS += ['testserver'] | ALLOWED_HOSTS += ['testserver'] | ||||
# Silent DEBUG output when running unit tests | # Silent DEBUG output when running unit tests | ||||
LOGGING['handlers']['console']['level'] = 'INFO' | LOGGING['handlers']['console']['level'] = 'INFO' |