-
Notifications
You must be signed in to change notification settings - Fork 4
/
test_settings.py
77 lines (66 loc) · 2.06 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
from djangocms_fil_bootstrap.compat import DJANGO_CMS_4_1
class DisableMigrations(object):
"""
Django-cms disables all migrations when they run their tests.
It would be better to not do it. Right now we are forced to disable our
migrations because we inherit one of our models from django-cms.
The error in question is due to an incompability of sqlite3 and
with atomic transactions.
"""
def __contains__(self, item):
return True
def __getitem__(self, item):
return None
HELPER_SETTINGS = {
"SECRET_KEY": "djangocms-fil-bootstrap-tests",
"TIME_ZONE": "America/Chicago",
"INSTALLED_APPS": [
"djangocms_text_ckeditor",
"djangocms_column",
"djangocms_fil_bootstrap",
"djangocms_versioning",
"djangocms_moderation",
],
"CMS_PERMISSION": True,
"LANGUAGES": (
("en", "English"),
("de", "German"),
("fr", "French"),
("it", "Italiano"),
),
"MIGRATION_MODULES": DisableMigrations(),
"CMS_LANGUAGES": {
1: [
{"code": "en", "name": "English", "fallbacks": ["de", "fr"]},
{
"code": "de",
"name": "Deutsche",
"fallbacks": ["en"], # FOR TESTING DO NOT ADD 'fr' HERE
},
{
"code": "fr",
"name": "Française",
"fallbacks": ["en"], # FOR TESTING DO NOT ADD 'de' HERE
},
{
"code": "it",
"name": "Italiano",
"fallbacks": ["fr"], # FOR TESTING, LEAVE AS ONLY 'fr'
},
]
},
"PARLER_ENABLE_CACHING": False,
"LANGUAGE_CODE": "en",
"CMS_CONFIRM_VERSION4": True,
"DEFAULT_AUTO_FIELD": "django.db.models.AutoField",
}
if not DJANGO_CMS_4_1:
HELPER_SETTINGS['INSTALLED_APPS'].extend([
"djangocms_version_locking",
"djangocms_alias"
])
def run():
from app_helper import runner
runner.cms("djangocms_fil_bootstrap", extra_args=[])
if __name__ == "__main__":
run()