This repository has been archived by the owner on Mar 15, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 235
/
settings_test.py
78 lines (67 loc) · 2.13 KB
/
settings_test.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
import atexit
import tempfile
from mkt.settings import * # noqa
_tmpdirs = set()
def _cleanup():
try:
import sys
import shutil
except ImportError:
return
tmp = None
try:
for tmp in _tmpdirs:
shutil.rmtree(tmp)
except Exception, exc:
sys.stderr.write("\n** shutil.rmtree(%r): %s\n" % (tmp, exc))
atexit.register(_cleanup)
def _polite_tmpdir():
tmp = tempfile.mkdtemp()
_tmpdirs.add(tmp)
return tmp
# Various paths. See mkt/settings.py for documentation:
NETAPP_STORAGE = _polite_tmpdir()
ADDONS_PATH = _polite_tmpdir()
ADDON_ICONS_PATH = _polite_tmpdir()
WEBSITE_ICONS_PATH = _polite_tmpdir()
WEBAPP_PROMO_IMG_PATH = _polite_tmpdir()
WEBSITE_PROMO_IMG_PATH = _polite_tmpdir()
GUARDED_ADDONS_PATH = _polite_tmpdir()
SIGNED_APPS_PATH = _polite_tmpdir()
SIGNED_APPS_REVIEWER_PATH = _polite_tmpdir()
SIGNING_SERVER_ACTIVE = False
UPLOADS_PATH = _polite_tmpdir()
TMP_PATH = _polite_tmpdir()
REVIEWER_ATTACHMENTS_PATH = _polite_tmpdir()
DUMPED_APPS_PATH = _polite_tmpdir()
EXTENSIONS_PATH = _polite_tmpdir()
SIGNED_EXTENSIONS_PATH = _polite_tmpdir()
ALLOW_SELF_REVIEWS = True
BROWSERID_AUDIENCES = [SITE_URL]
CELERY_ROUTES = {}
CELERY_ALWAYS_EAGER = True
DEBUG = False
DEBUG_PROPAGATE_EXCEPTIONS = False
EMAIL_BACKEND = 'django.core.mail.backends.locmem.EmailBackend'
ES_DEFAULT_NUM_REPLICAS = 0
# See the following URL on why we set num_shards to 1 for tests:
# http://www.elasticsearch.org/guide/en/elasticsearch/guide/current/relevance-is-broken.html
ES_DEFAULT_NUM_SHARDS = 1
IARC_MOCK = True
IARC_V2_STORE_ID = 'dummy-store-id'
IARC_V2_STORE_PASSWORD = 'dummy-store-password'
IN_TEST_SUITE = True
INSTALLED_APPS += ('mkt.translations.tests.testapp',)
PASSWORD_HASHERS = (
'django.contrib.auth.hashers.MD5PasswordHasher',
)
PAYMENT_PROVIDERS = ['bango', 'reference']
# This is a precaution in case something isn't mocked right.
PRE_GENERATE_APK_URL = 'http://you-should-never-load-this.com/'
RUN_ES_TESTS = True
SEND_REAL_EMAIL = True
SITE_URL = 'http://testserver'
STATIC_URL = SITE_URL + '/'
TASK_USER_ID = '4043307'
TEMPLATE_DEBUG = False
VIDEO_LIBRARIES = ['lib.video.dummy']