diff options
author | Matthew Lemon <lemon@matthewlemon.com> | 2020-01-19 15:57:06 +0000 |
---|---|---|
committer | Matthew Lemon <lemon@matthewlemon.com> | 2020-01-19 15:57:06 +0000 |
commit | 9d76a3c52b8310726ec09e0262813f0438c21df6 (patch) | |
tree | 4acf47dce6c3aa75f8ad7c5cb56fe6486c2d64a7 /config/settings/test.py |
init commit - from cookiecutter
Diffstat (limited to 'config/settings/test.py')
-rw-r--r-- | config/settings/test.py | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/config/settings/test.py b/config/settings/test.py new file mode 100644 index 0000000..718cbdb --- /dev/null +++ b/config/settings/test.py @@ -0,0 +1,51 @@ +""" +With these settings, tests run faster. +""" + +from .base import * # noqa +from .base import env + +# GENERAL +# ------------------------------------------------------------------------------ +# https://docs.djangoproject.com/en/dev/ref/settings/#secret-key +SECRET_KEY = env( + "DJANGO_SECRET_KEY", + default="YjL0TsaerybdulEyjn4hxDZ3207sgDVpr7NOoSuzAJHMAL5GNbHdKwFrsyptQ0Je", +) +# https://docs.djangoproject.com/en/dev/ref/settings/#test-runner +TEST_RUNNER = "django.test.runner.DiscoverRunner" + +# CACHES +# ------------------------------------------------------------------------------ +# https://docs.djangoproject.com/en/dev/ref/settings/#caches +CACHES = { + "default": { + "BACKEND": "django.core.cache.backends.locmem.LocMemCache", + "LOCATION": "", + } +} + +# PASSWORDS +# ------------------------------------------------------------------------------ +# https://docs.djangoproject.com/en/dev/ref/settings/#password-hashers +PASSWORD_HASHERS = ["django.contrib.auth.hashers.MD5PasswordHasher"] + +# TEMPLATES +# ------------------------------------------------------------------------------ +TEMPLATES[-1]["OPTIONS"]["loaders"] = [ # type: ignore[index] # noqa F405 + ( + "django.template.loaders.cached.Loader", + [ + "django.template.loaders.filesystem.Loader", + "django.template.loaders.app_directories.Loader", + ], + ) +] + +# EMAIL +# ------------------------------------------------------------------------------ +# https://docs.djangoproject.com/en/dev/ref/settings/#email-backend +EMAIL_BACKEND = "django.core.mail.backends.locmem.EmailBackend" + +# Your stuff... +# ------------------------------------------------------------------------------ |