feat: Implement initial schema and add various API, service, and management command enhancements across the application.

This commit is contained in:
pacnpal
2026-01-01 15:13:01 -05:00
parent c95f99ca10
commit b243b17af7
413 changed files with 11164 additions and 17433 deletions

View File

@@ -75,9 +75,7 @@ class TestParkListApi(APITestCase):
self.assertEqual(response.status_code, status.HTTP_200_OK)
# Should return only operating parks (2 out of 3)
operating_parks = [
p for p in response.data["data"] if p["status"] == "OPERATING"
]
operating_parks = [p for p in response.data["data"] if p["status"] == "OPERATING"]
self.assertEqual(len(operating_parks), 2)
def test__park_list_api__with_search_query__returns_matching_results(self):
@@ -315,9 +313,7 @@ class TestParkApiErrorHandling(APITestCase):
"""Test that malformed JSON returns proper error."""
url = reverse("parks_api:park-list")
response = self.client.post(
url, data='{"invalid": json}', content_type="application/json"
)
response = self.client.post(url, data='{"invalid": json}', content_type="application/json")
self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST)
self.assertEqual(response.data["status"], "error")
@@ -358,9 +354,7 @@ class TestParkApiIntegration(APITestCase):
retrieve_response = self.client.get(detail_url)
self.assertEqual(retrieve_response.status_code, status.HTTP_200_OK)
self.assertEqual(
retrieve_response.data["data"]["name"], "Integration Test Park"
)
self.assertEqual(retrieve_response.data["data"]["name"], "Integration Test Park")
# 3. Update park
update_data = {"description": "Updated integration test description"}