Changeset View
Changeset View
Standalone View
Standalone View
swh/deposit/tests/__init__.py
Show First 20 Lines • Show All 61 Lines • ▼ Show 20 Lines | |||||
def parse_loader_config_file(base_filename=None, config_filename=None, | def parse_loader_config_file(base_filename=None, config_filename=None, | ||||
additional_configs=None, global_config=True): | additional_configs=None, global_config=True): | ||||
return TEST_LOADER_CONFIG | return TEST_LOADER_CONFIG | ||||
# monkey patch classes method permits to override, for tests purposes, | # monkey patch classes method permits to override, for tests purposes, | ||||
# the default configuration without side-effect, i.e do not load the | # the default configuration without side-effect, i.e do not load the | ||||
# configuration from disk | # configuration from disk | ||||
SWHDefaultConfig.parse_config_file = parse_deposit_config_file | SWHDefaultConfig.parse_config_file = parse_deposit_config_file # type: ignore | ||||
BufferedLoader.parse_config_file = parse_loader_config_file | BufferedLoader.parse_config_file = parse_loader_config_file # type: ignore | ||||
setup_django_for('testing') | setup_django_for('testing') |