forked from openedx/edx-proctoring
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest_settings.py
109 lines (89 loc) · 2.61 KB
/
test_settings.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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
"""
These settings are here to use during tests, because Django requires them.
In a real-world use case, apps in this project are installed into other
Django applications, so these settings will not be used.
"""
from __future__ import absolute_import, unicode_literals
import sys
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
BASE_DIR = os.path.dirname(__file__)
DEBUG=True
TEST_MODE=True
TEST_RUNNER = 'django_nose.NoseTestSuiteRunner'
TEST_ROOT = "tests"
TRANSACTIONS_MANAGED = {}
USE_TZ = True
TIME_ZONE = {}
SECRET_KEY='SHHHHHH'
PLATFORM_NAME='Open edX'
FEATURES = {}
HTTPS = 'off'
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'edx_proctoring.db'),
},
}
SITE_ID = 1
SITE_NAME = 'localhost:8000'
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'rest_framework',
'edx_proctoring',
'django_nose'
)
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.6/howto/static-files/
STATIC_URL = '/static/'
REST_FRAMEWORK = {
'DEFAULT_THROTTLE_CLASSES': (
'rest_framework.throttling.UserRateThrottle',
),
}
if not TEST_MODE:
# we don't want to throttle unit tests
REST_FRAMEWORK.update({
'DEFAULT_THROTTLE_RATES': {
'user': '10/sec',
}
})
MIDDLEWARE_CLASSES = (
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
)
ROOT_URLCONF = 'edx_proctoring.urls'
COURSE_ID_REGEX = r'[^/+]+(/|\+)[^/+]+(/|\+)[^/]+'
COURSE_ID_PATTERN = r'(?P<course_id>%s)' % COURSE_ID_REGEX
PROCTORING_BACKEND_PROVIDER = {
"class": "edx_proctoring.backends.tests.test_backend.TestBackendProvider",
"options": {}
}
PROCTORING_SETTINGS = {
'MUST_BE_VERIFIED_TRACK': True,
'MUST_COMPLETE_ICRV': True,
'LINK_URLS': {
'online_proctoring_rules': '',
'faq': '',
'contact_us': '',
'tech_requirements': '',
},
'ALLOW_CALLBACK_SIMULATION': False
}
DEFAULT_FROM_EMAIL = '[email protected]'
CONTACT_EMAIL = '[email protected]'
TECH_SUPPORT_EMAIL = '[email protected]'
########## TEMPLATE CONFIGURATION
TEMPLATES = [{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'APP_DIRS': True,
}]
########## END TEMPLATE CONFIGURATION