mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-20 07:31:07 -05:00
- Implemented extensive test cases for the Parks API, covering endpoints for listing, retrieving, creating, updating, and deleting parks. - Added tests for filtering, searching, and ordering parks in the API. - Created tests for error handling in the API, including malformed JSON and unsupported methods. - Developed model tests for Park, ParkArea, Company, and ParkReview models, ensuring validation and constraints are enforced. - Introduced utility mixins for API and model testing to streamline assertions and enhance test readability. - Included integration tests to validate complete workflows involving park creation, retrieval, updating, and deletion.
46 lines
1.0 KiB
Python
46 lines
1.0 KiB
Python
"""
|
|
Test Django settings for thrillwiki accounts app.
|
|
"""
|
|
|
|
from .base import *
|
|
|
|
# Use in-memory database for tests
|
|
DATABASES = {
|
|
'default': {
|
|
'ENGINE': 'django.contrib.gis.db.backends.postgis',
|
|
'NAME': 'test_db',
|
|
}
|
|
}
|
|
|
|
# Use a faster password hasher for tests
|
|
PASSWORD_HASHERS = [
|
|
'django.contrib.auth.hashers.MD5PasswordHasher',
|
|
]
|
|
|
|
# Disable whitenoise for tests
|
|
WHITENOISE_AUTOREFRESH = True
|
|
STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'
|
|
|
|
INSTALLED_APPS = [
|
|
"django.contrib.admin",
|
|
"django.contrib.auth",
|
|
"django.contrib.contenttypes",
|
|
"django.contrib.sessions",
|
|
"django.contrib.messages",
|
|
"django.contrib.staticfiles",
|
|
"django.contrib.sites",
|
|
"allauth",
|
|
"allauth.account",
|
|
"allauth.socialaccount",
|
|
"accounts",
|
|
"core",
|
|
"pghistory",
|
|
"pgtrigger",
|
|
"email_service",
|
|
"parks",
|
|
"rides",
|
|
"media.apps.MediaConfig",
|
|
]
|
|
|
|
GDAL_LIBRARY_PATH = '/opt/homebrew/lib/libgdal.dylib'
|
|
GEOS_LIBRARY_PATH = '/opt/homebrew/lib/libgeos_c.dylib' |