cookiecutter-django/{{cookiecutter.project_slug}}/config/settings/test.py

54 lines
1.7 KiB
Python
Raw Normal View History

"""
With these settings, tests run faster.
"""
2016-06-23 21:41:44 +03:00
from .base import * # noqa
from .base import env
2016-06-23 21:41:44 +03:00
# GENERAL
2016-06-23 21:41:44 +03:00
# ------------------------------------------------------------------------------
# https://docs.djangoproject.com/en/dev/ref/settings/#debug
2016-06-23 21:41:44 +03:00
DEBUG = False
# https://docs.djangoproject.com/en/dev/ref/settings/#secret-key
SECRET_KEY = env(
"DJANGO_SECRET_KEY",
default="!!!SET DJANGO_SECRET_KEY!!!",
)
# https://docs.djangoproject.com/en/dev/ref/settings/#test-runner
TEST_RUNNER = "django.test.runner.DiscoverRunner"
2016-06-23 21:41:44 +03:00
# CACHES
2016-06-23 21:41:44 +03:00
# ------------------------------------------------------------------------------
# https://docs.djangoproject.com/en/dev/ref/settings/#caches
2016-06-23 21:41:44 +03:00
CACHES = {
"default": {
"BACKEND": "django.core.cache.backends.locmem.LocMemCache",
"LOCATION": "",
2016-06-23 21:41:44 +03:00
}
}
# PASSWORDS
2016-06-23 21:41:44 +03:00
# ------------------------------------------------------------------------------
# https://docs.djangoproject.com/en/dev/ref/settings/#password-hashers
PASSWORD_HASHERS = ["django.contrib.auth.hashers.MD5PasswordHasher"]
2016-06-23 21:41:44 +03:00
# TEMPLATES
2016-06-23 21:41:44 +03:00
# ------------------------------------------------------------------------------
TEMPLATES[0]["OPTIONS"]["loaders"] = [ # noqa F405
(
"django.template.loaders.cached.Loader",
[
"django.template.loaders.filesystem.Loader",
"django.template.loaders.app_directories.Loader",
],
)
2016-06-23 21:41:44 +03:00
]
# EMAIL
# ------------------------------------------------------------------------------
# https://docs.djangoproject.com/en/dev/ref/settings/#email-backend
EMAIL_BACKEND = "django.core.mail.backends.locmem.EmailBackend"
# Your stuff...
# ------------------------------------------------------------------------------