mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 04:52:12 +00:00
test_settings: Use TEST_EXTERNAL_HOST to override ‘testserver’ default.
This allows test-backend to work even if the user has EXTERNAL_HOST set to something else. Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
9b6d92d322
commit
9359dee75b
@@ -25,7 +25,7 @@ from zerver.lib.test_fixtures import update_test_databases_if_required
|
||||
|
||||
def set_up_django(external_host: str) -> None:
|
||||
os.environ['FULL_STACK_ZULIP_TEST'] = '1'
|
||||
os.environ['EXTERNAL_HOST'] = external_host
|
||||
os.environ['TEST_EXTERNAL_HOST'] = external_host
|
||||
os.environ["LOCAL_UPLOADS_DIR"] = get_or_create_dev_uuid_var_path(
|
||||
'test-backend/test_uploads')
|
||||
os.environ['DJANGO_SETTINGS_MODULE'] = 'zproject.test_settings'
|
||||
|
@@ -15,8 +15,7 @@ import os
|
||||
# transmitting the value of EXTERNAL_HOST to dev_settings.py so that
|
||||
# it can be set there, at the right place in the settings.py flow.
|
||||
# Ick.
|
||||
if os.getenv("EXTERNAL_HOST") is None:
|
||||
os.environ["EXTERNAL_HOST"] = "testserver"
|
||||
os.environ["EXTERNAL_HOST"] = os.getenv("TEST_EXTERNAL_HOST", "testserver")
|
||||
|
||||
from .settings import * # noqa: F401,F403 isort: skip
|
||||
from .test_extra_settings import * # noqa: F401,F403 isort: skip
|
||||
|
Reference in New Issue
Block a user