mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-20 09:11:08 -05:00
Add comprehensive tests for Parks API and models
- 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.
This commit is contained in:
@@ -6,7 +6,12 @@ import sys
|
||||
|
||||
def main():
|
||||
"""Run administrative tasks."""
|
||||
os***REMOVED***iron.setdefault("DJANGO_SETTINGS_MODULE", "thrillwiki.settings")
|
||||
if 'test' in sys.argv and 'accounts' in sys.argv:
|
||||
os***REMOVED***iron.setdefault("DJANGO_SETTINGS_MODULE", "config.django.test_accounts")
|
||||
elif 'test' in sys.argv:
|
||||
os***REMOVED***iron.setdefault("DJANGO_SETTINGS_MODULE", "config.django.test")
|
||||
else:
|
||||
os***REMOVED***iron.setdefault("DJANGO_SETTINGS_MODULE", "config.django.local")
|
||||
try:
|
||||
from django.core.management import execute_from_command_line
|
||||
except ImportError as exc:
|
||||
|
||||
Reference in New Issue
Block a user