-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create a separate test settings file.
- Updates manage.py to default to the test settings unless specified in the command or env. - Disables whitenoises warning about static files directories not existing. - Uses the md5 password hasher for tests to speed them up.
- Loading branch information
1 parent
06fc941
commit a66b8de
Showing
4 changed files
with
24 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from __future__ import annotations | ||
|
||
from .production import * | ||
|
||
# Get rid of whitenoise "No directory at" warning, as it's not helpful when running tests. | ||
# Related: | ||
# - https://github.com/evansd/whitenoise/issues/215 | ||
# - https://github.com/evansd/whitenoise/issues/191 | ||
# - https://github.com/evansd/whitenoise/commit/4204494d44213f7a51229de8bc224cf6d84c01eb | ||
WHITENOISE_AUTOREFRESH = True | ||
|
||
# Use MD5 hasher as it's much faster per: | ||
# https://docs.djangoproject.com/en/5.0/topics/testing/overview/#password-hashing | ||
PASSWORD_HASHERS = [ | ||
"django.contrib.auth.hashers.MD5PasswordHasher", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
-r requirements.txt | ||
-r requirements-test.txt | ||
pre-commit | ||
django-tailwind[reload] | ||
django-debug-toolbar |