aboutsummaryrefslogtreecommitdiffstats
path: root/config/settings/test.py
diff options
context:
space:
mode:
authorMatthew Lemon <y@yulqen.org>2024-05-13 17:26:25 +0100
committerMatthew Lemon <y@yulqen.org>2024-05-13 17:26:25 +0100
commitefbbd480ddc62e695123d31c31d233b0df5155bd (patch)
treebc2fb465edd5050d83c97f280b1aac8e023fe3e5 /config/settings/test.py
After first pre-commit processing
Diffstat (limited to 'config/settings/test.py')
-rw-r--r--config/settings/test.py38
1 files changed, 38 insertions, 0 deletions
diff --git a/config/settings/test.py b/config/settings/test.py
new file mode 100644
index 0000000..07380c0
--- /dev/null
+++ b/config/settings/test.py
@@ -0,0 +1,38 @@
+"""
+With these settings, tests run faster.
+"""
+
+from .base import * # noqa: F403
+from .base import TEMPLATES
+from .base import env
+
+# GENERAL
+# ------------------------------------------------------------------------------
+# https://docs.djangoproject.com/en/dev/ref/settings/#secret-key
+SECRET_KEY = env(
+ "DJANGO_SECRET_KEY",
+ default="2uUCs0i1i4UXRmFVrg0FQ7YbKuyWFBCAbeheVhs3GqVpFploH78TqxD8jfN3T6R8",
+)
+# https://docs.djangoproject.com/en/dev/ref/settings/#test-runner
+TEST_RUNNER = "django.test.runner.DiscoverRunner"
+
+# PASSWORDS
+# ------------------------------------------------------------------------------
+# https://docs.djangoproject.com/en/dev/ref/settings/#password-hashers
+PASSWORD_HASHERS = ["django.contrib.auth.hashers.MD5PasswordHasher"]
+
+# EMAIL
+# ------------------------------------------------------------------------------
+# https://docs.djangoproject.com/en/dev/ref/settings/#email-backend
+EMAIL_BACKEND = "django.core.mail.backends.locmem.EmailBackend"
+
+# DEBUGGING FOR TEMPLATES
+# ------------------------------------------------------------------------------
+TEMPLATES[0]["OPTIONS"]["debug"] = True # type: ignore[index]
+
+# MEDIA
+# ------------------------------------------------------------------------------
+# https://docs.djangoproject.com/en/dev/ref/settings/#media-url
+MEDIA_URL = "http://media.testserver"
+# Your stuff...
+# ------------------------------------------------------------------------------