test_upload: Refactor test_upload output to new filepath.

We write a function to set the `LOCAL_UPLOADS_DIR` path depending
on whether tests are being run in parallel or serial mode.
This commit is contained in:
Wyatt Hoodes
2019-07-05 09:50:51 -10:00
committed by Tim Abbott
parent ff156c1f8a
commit 5f20caa6e0
3 changed files with 29 additions and 19 deletions

View File

@@ -18,8 +18,6 @@ if os.getenv("EXTERNAL_HOST") is None:
os.environ["EXTERNAL_HOST"] = "testserver"
from .settings import *
from scripts.lib.zulip_tools import get_or_create_dev_uuid_var_path
# Clear out the REALM_HOSTS set in dev_settings.py
REALM_HOSTS = {}
@@ -126,11 +124,9 @@ if not CASPER_TESTS:
# Enable file:/// hyperlink support by default in tests
ENABLE_FILE_LINKS = True
LOCAL_UPLOADS_DIR = get_or_create_dev_uuid_var_path('test-backend/test_uploads')
# These settings are set dynamically in `zerver/lib/test_runner.py`:
TEST_WORKER_DIR = ''
LOCAL_UPLOADS_DIR = ''
S3_KEY = 'test-key'
S3_SECRET_KEY = 'test-secret-key'