mirror of
https://github.com/lemeow125/DRF_Template.git
synced 2025-09-18 05:29:37 +08:00
Implement tests
This commit is contained in:
parent
7b1d9d2b4c
commit
0baf619ace
19 changed files with 432 additions and 48 deletions
21
src/tests/settings.py
Normal file
21
src/tests/settings.py
Normal file
|
@ -0,0 +1,21 @@
|
|||
"""
|
||||
Minimal Django settings file for tests
|
||||
"""
|
||||
|
||||
from core.settings import * # noqa: F403
|
||||
|
||||
|
||||
# Override database to SQLite
|
||||
DATABASES = {
|
||||
"default": {
|
||||
"ENGINE": "django.db.backends.sqlite3",
|
||||
"NAME": BASE_DIR / "test_db.sqlite3", # noqa: F405
|
||||
}
|
||||
}
|
||||
|
||||
# Use dummy cache
|
||||
CACHES = {
|
||||
"default": {
|
||||
"BACKEND": "django.core.cache.backends.dummy.DummyCache",
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue