Skip to content

Commit

Permalink
Change test setting to tests.settings
Browse files Browse the repository at this point in the history
  • Loading branch information
fsbraun committed Nov 10, 2024
1 parent 21ddbc1 commit 0ad8ff2
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 58 deletions.
2 changes: 1 addition & 1 deletion conftest.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@


def pytest_configure():
os.environ["DJANGO_SETTINGS_MODULE"] = "tests.test_settings"
os.environ["DJANGO_SETTINGS_MODULE"] = "tests.settings"
django.setup()


Expand Down
114 changes: 57 additions & 57 deletions tests/test_settings.py → tests/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def __getitem__(self, item):

MIGRATION_MODULES = DisableMigrations()

SECRET_KEY = 'djangocms-text-test-suite'
SECRET_KEY = "djangocms-text-test-suite"

INSTALLED_APPS = [
"django.contrib.contenttypes",
Expand All @@ -25,16 +25,16 @@ def __getitem__(self, item):
"django.contrib.sessions",
"django.contrib.admin",
"django.contrib.messages",
'easy_thumbnails',
'filer',
'cms',
'menus',
'treebeard',
'sekizai',
'djangocms_picture',
'djangocms_link',
'djangocms_text',
'tests.test_app',
"easy_thumbnails",
"filer",
"cms",
"menus",
"treebeard",
"sekizai",
"djangocms_picture",
"djangocms_link",
"djangocms_text",
"tests.test_app",
]

MIDDLEWARE = [
Expand Down Expand Up @@ -69,82 +69,82 @@ def __getitem__(self, item):
CMS_LANGUAGES = {
1: [
{
'code': 'en',
'name': gettext('English'),
'public': True,
"code": "en",
"name": gettext("English"),
"public": True,
},
{
'code': 'it',
'name': gettext('Italiano'),
'public': True,
"code": "it",
"name": gettext("Italiano"),
"public": True,
},
{
'code': 'fr',
'name': gettext('French'),
'public': True,
"code": "fr",
"name": gettext("French"),
"public": True,
},
],
'default': {
'hide_untranslated': False,
"default": {
"hide_untranslated": False,
},
}

LANGUAGES = (
('en', gettext('English')),
('fr', gettext('French')),
('it', gettext('Italiano')),
("en", gettext("English")),
("fr", gettext("French")),
("it", gettext("Italiano")),
)

LANGUAGE_CODE = 'en'
ALLOWED_HOSTS = ['localhost', '127.0.0.1']
LANGUAGE_CODE = "en"
ALLOWED_HOSTS = ["localhost", "127.0.0.1"]
CMS_PERMISSION = False
CMS_PLACEHOLDER_CONF = {
'content': {
'plugins': ['TextPlugin', 'PicturePlugin'],
'text_only_plugins': ['LinkPlugin'],
'extra_context': {'width': 640},
'name': gettext('Content'),
'language_fallback': True,
'default_plugins': [
"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>',
"plugin_type": "TextPlugin",
"values": {
"body": "<p>Lorem ipsum dolor sit amet...</p>",
},
},
],
'child_classes': {
'TextPlugin': ['PicturePlugin', 'LinkPlugin'],
"child_classes": {
"TextPlugin": ["PicturePlugin", "LinkPlugin"],
},
'parent_classes': {
'LinkPlugin': ['TextPlugin'],
"parent_classes": {
"LinkPlugin": ["TextPlugin"],
},
'plugin_modules': {
'LinkPlugin': 'Extra',
"plugin_modules": {
"LinkPlugin": "Extra",
},
'plugin_labels': {
'LinkPlugin': 'Add a link',
"plugin_labels": {
"LinkPlugin": "Add a link",
},
},
}

FILE_UPLOAD_TEMP_DIR = mkdtemp()
SITE_ID = 1
THUMBNAIL_PROCESSORS = (
'easy_thumbnails.processors.colorspace',
'easy_thumbnails.processors.autocrop',
'filer.thumbnail_processors.scale_and_crop_with_subject_location',
'easy_thumbnails.processors.filters',
"easy_thumbnails.processors.colorspace",
"easy_thumbnails.processors.autocrop",
"filer.thumbnail_processors.scale_and_crop_with_subject_location",
"easy_thumbnails.processors.filters",
)

CMS_TEMPLATES = (
('page.html', 'Normal page'),
('plugin_with_sekizai.html', 'Plugin with sekizai'),
("page.html", "Normal page"),
("plugin_with_sekizai.html", "Plugin with sekizai"),
)

DJANGOCMS_TRANSLATIONS_CONF = {
'Bootstrap3ButtonCMSPlugin': {'text_field_child_label': 'label'},
'DummyLinkPlugin': {'text_field_child_label': 'label'},
"Bootstrap3ButtonCMSPlugin": {"text_field_child_label": "label"},
"DummyLinkPlugin": {"text_field_child_label": "label"},
}

TEXT_INLINE_EDITING = True
Expand All @@ -159,11 +159,11 @@ def __getitem__(self, item):
}
}

ROOT_URLCONF = 'tests.urls'
ROOT_URLCONF = "tests.urls"

STATIC_URL = '/static/'
MEDIA_URL = '/media/'
STATIC_URL = "/static/"
MEDIA_URL = "/media/"

SESSION_ENGINE = "django.contrib.sessions.backends.cache"

DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField"

0 comments on commit 0ad8ff2

Please sign in to comment.