forked from django-cms/djangocms-text-ckeditor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_settings.py
94 lines (87 loc) · 2.43 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
# -*- coding: utf-8 -*-
from distutils.version import LooseVersion
import sys
from tempfile import mkdtemp
import django
gettext = lambda s: s
HELPER_SETTINGS = {
'INSTALLED_APPS': [
'djangocms_picture',
'djangocms_link',
],
'LANGUAGE_CODE': 'en',
'LANGUAGES': (
('en', gettext('English')),
('fr', gettext('French')),
('it', gettext('Italiano')),
),
'CMS_LANGUAGES': {
1: [
{
'code': 'en',
'name': gettext('English'),
'public': True,
},
{
'code': 'it',
'name': gettext('Italiano'),
'public': True,
},
{
'code': 'fr',
'name': gettext('French'),
'public': True,
},
],
'default': {
'hide_untranslated': False,
},
},
'MIGRATION_MODULES': {
'djangocms_picture': 'djangocms_picture.migrations_django',
'djangocms_link': 'djangocms_link.migrations_django',
},
'CMS_PERMISSION': True,
'CMS_PLACEHOLDER_CONF': {
'content': {
'plugins': ['TextPlugin', 'PicturePlugin'],
'text_only_plugins': ['LinkPlugin'],
'extra_context': {"width": 640},
'name': gettext("Content"),
'language_fallback': True,
'default_plugins': [
{
'plugin_type': 'TextPlugin',
'values': {
'body':'<p>Lorem ipsum dolor sit amet...</p>',
},
},
],
'child_classes': {
'TextPlugin': ['PicturePlugin', 'LinkPlugin'],
},
'parent_classes': {
'LinkPlugin': ['TextPlugin'],
},
'plugin_modules': {
'LinkPlugin': 'Extra',
},
'plugin_labels': {
'LinkPlugin': 'Add a link',
}
},
},
'FILE_UPLOAD_TEMP_DIR': mkdtemp(),
'SITE_ID': 1
}
if LooseVersion(django.get_version()) < LooseVersion('1.6'):
HELPER_SETTINGS['INSTALLED_APPS'] += [
'discover_runner'
]
HELPER_SETTINGS['TEST_RUNNER'] = 'discover_runner.DiscoverRunner'
def run():
import sys
from djangocms_helper import runner
runner.cms('djangocms_text_ckeditor')
if __name__ == "__main__":
run()