mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-20 13:31:08 -05:00
Add comprehensive audit reports, design assessment, and non-authenticated features testing for ThrillWiki application
- Created critical functionality audit report identifying 7 critical issues affecting production readiness. - Added design assessment report highlighting exceptional design quality and minor cosmetic fixes needed. - Documented non-authenticated features testing results confirming successful functionality and public access. - Implemented ride search form with autocomplete functionality and corresponding templates for search results. - Developed tests for ride autocomplete functionality, ensuring proper filtering and authentication checks.
This commit is contained in:
@@ -4,6 +4,7 @@ slug handling, status management, and location integration.
|
||||
"""
|
||||
from django.test import TestCase
|
||||
from django.core.exceptions import ValidationError
|
||||
from django.db import IntegrityError
|
||||
from django.utils import timezone
|
||||
from datetime import date
|
||||
|
||||
@@ -192,12 +193,15 @@ class ParkAreaModelTests(TestCase):
|
||||
|
||||
def test_unique_together_constraint(self):
|
||||
"""Test unique_together constraint for park and slug"""
|
||||
from django.db import transaction
|
||||
|
||||
# Try to create area with same slug in same park
|
||||
with self.assertRaises(ValidationError):
|
||||
ParkArea.objects.create(
|
||||
park=self.park,
|
||||
name="Test Area" # Will generate same slug
|
||||
)
|
||||
with transaction.atomic():
|
||||
with self.assertRaises(IntegrityError):
|
||||
ParkArea.objects.create(
|
||||
park=self.park,
|
||||
name="Test Area" # Will generate same slug
|
||||
)
|
||||
|
||||
# Should be able to use same name in different park
|
||||
other_park = Park.objects.create(name="Other Park")
|
||||
|
||||
Reference in New Issue
Block a user