forked from openedx/edx-enterprise
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_settings.py
112 lines (84 loc) · 2.77 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
110
111
112
"""
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
from os.path import abspath, dirname, join
def root(*args):
"""
Get the absolute path of the given path relative to the project root.
"""
return join(abspath(dirname(__file__)), *args)
DATABASES = {
"default": {
"ENGINE": "django.db.backends.sqlite3",
"NAME": "default.db",
"USER": "",
"PASSWORD": "",
"HOST": "",
"PORT": "",
}
}
INSTALLED_APPS = (
"django.contrib.auth",
"django.contrib.contenttypes",
"django.contrib.sites",
"django.contrib.sessions",
"django.contrib.admin", # only used in DEBUG mode
"enterprise",
)
MIDDLEWARE_CLASSES = [
"django.contrib.sessions.middleware.SessionMiddleware",
"django.contrib.auth.middleware.AuthenticationMiddleware",
"django.contrib.messages.middleware.MessageMiddleware",
]
MIDDLEWARE = MIDDLEWARE_CLASSES # Django 1.10 compatibility - the setting was renamed
AUTHENTICATION_BACKENDS = ["django.contrib.auth.backends.ModelBackend"]
SESSION_ENGINE = "django.contrib.sessions.backends.file"
LOCALE_PATHS = [
root("enterprise", "conf", "locale"),
]
MAKO_TEMPLATES = {
"main": []
}
TEMPLATES = [
{
"BACKEND": "django.template.backends.django.DjangoTemplates",
"APP_DIRS": True,
"OPTIONS": {
"context_processors": {
"django.contrib.auth.context_processors.auth", # this is required for admin
"django.contrib.messages.context_processors.messages",
}
}
},
]
PLATFORM_NAME = "Test platform"
ROOT_URLCONF = "enterprise.urls"
SECRET_KEY = "insecure-secret-key"
# Default Site id
SITE_ID = 1
EDX_API_KEY = "PUT_YOUR_API_KEY_HERE"
ENTERPRISE_ENROLLMENT_API_URL = "http://localhost:8000/api/enrollment/v1/"
COURSE_CATALOG_API_URL = "http://localhost:18381/api/v1/"
LMS_ROOT_URL = "http://localhost:8000"
EMAIL_BACKEND = 'django.core.mail.backends.locmem.EmailBackend'
DEFAULT_FROM_EMAIL = '[email protected]'
REST_FRAMEWORK = {
'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.PageNumberPagination',
'PAGE_SIZE': 10,
'URL_FORMAT_OVERRIDE': None,
'DEFAULT_THROTTLE_CLASSES': (
'rest_framework.throttling.UserRateThrottle',
),
'DEFAULT_THROTTLE_RATES': {
'user': '50/minute',
'service_user': '60/minute',
},
}
# URL for the server that django client listens to by default.
TEST_SERVER = "http://testserver"
MEDIA_URL = "/"
ECOMMERCE_SERVICE_WORKER_USERNAME = 'ecommerce_worker'
ENTERPRISE_SERVICE_WORKER_USERNAME = 'enterprise_worker'