Skip to content
Snippets Groups Projects
Verified Commit d0c39d29 authored by Antoine R. Dumont's avatar Antoine R. Dumont
Browse files

swh.deposit.tests: Reuse swh.deposit.config setup routine

parent 19a6a072
No related branches found
No related tags found
No related merge requests found
......@@ -21,7 +21,7 @@ PRIVATE_PUT_DEPOSIT = 'private-update'
ARCHIVE_KEY = 'archive'
METADATA_KEY = 'metadata'
AUTHORIZED_PLATFORMS = ['development', 'production']
AUTHORIZED_PLATFORMS = ['development', 'production', 'testing']
def setup_django_for(platform):
......
......@@ -3,7 +3,8 @@
# License: GNU General Public License version 3, or any later version
# See top-level LICENSE file for more information
import django
from swh.deposit.config import setup_django_for
from swh.deposit.config import SWHDefaultConfig # noqa
TEST_CONFIG = {
......@@ -17,9 +18,6 @@ TEST_CONFIG = {
}
from swh.deposit.config import SWHDefaultConfig # noqa
def parse_config_file(base_filename=None, config_filename=None,
additional_configs=None, global_config=True):
return TEST_CONFIG
......@@ -30,4 +28,4 @@ def parse_config_file(base_filename=None, config_filename=None,
# load the configuration from disk
SWHDefaultConfig.parse_config_file = parse_config_file
django.setup()
setup_django_for('testing')
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment