mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2026-01-02 01:47:04 -05:00
feat: Implement initial schema and add various API, service, and management command enhancements across the application.
This commit is contained in:
@@ -470,6 +470,3 @@ class TestUserProfileUpdateInputSerializer(TestCase):
|
||||
"""Test user field is read-only for updates."""
|
||||
extra_kwargs = UserProfileUpdateInputSerializer.Meta.extra_kwargs
|
||||
assert extra_kwargs.get("user", {}).get("read_only") is True
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -221,10 +221,7 @@ class TestParkPhotoListOutputSerializer(TestCase):
|
||||
|
||||
def test__meta__all_fields_read_only(self):
|
||||
"""Test all fields are read-only for list serializer."""
|
||||
assert (
|
||||
ParkPhotoListOutputSerializer.Meta.read_only_fields
|
||||
== ParkPhotoListOutputSerializer.Meta.fields
|
||||
)
|
||||
assert ParkPhotoListOutputSerializer.Meta.read_only_fields == ParkPhotoListOutputSerializer.Meta.fields
|
||||
|
||||
|
||||
class TestParkPhotoApprovalInputSerializer(TestCase):
|
||||
@@ -331,7 +328,7 @@ class TestHybridParkSerializer(TestCase):
|
||||
"""Test serializing park without location returns null for location fields."""
|
||||
park = ParkFactory()
|
||||
# Remove location if it exists
|
||||
if hasattr(park, 'location') and park.location:
|
||||
if hasattr(park, "location") and park.location:
|
||||
park.location.delete()
|
||||
|
||||
serializer = HybridParkSerializer(park)
|
||||
@@ -413,10 +410,7 @@ class TestHybridParkSerializer(TestCase):
|
||||
|
||||
def test__meta__all_fields_read_only(self):
|
||||
"""Test all fields in HybridParkSerializer are read-only."""
|
||||
assert (
|
||||
HybridParkSerializer.Meta.read_only_fields
|
||||
== HybridParkSerializer.Meta.fields
|
||||
)
|
||||
assert HybridParkSerializer.Meta.read_only_fields == HybridParkSerializer.Meta.fields
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
|
||||
@@ -219,10 +219,7 @@ class TestRidePhotoListOutputSerializer(TestCase):
|
||||
|
||||
def test__meta__all_fields_read_only(self):
|
||||
"""Test all fields are read-only for list serializer."""
|
||||
assert (
|
||||
RidePhotoListOutputSerializer.Meta.read_only_fields
|
||||
== RidePhotoListOutputSerializer.Meta.fields
|
||||
)
|
||||
assert RidePhotoListOutputSerializer.Meta.read_only_fields == RidePhotoListOutputSerializer.Meta.fields
|
||||
|
||||
|
||||
class TestRidePhotoApprovalInputSerializer(TestCase):
|
||||
@@ -477,10 +474,7 @@ class TestHybridRideSerializer(TestCase):
|
||||
|
||||
def test__meta__all_fields_read_only(self):
|
||||
"""Test all fields in HybridRideSerializer are read-only."""
|
||||
assert (
|
||||
HybridRideSerializer.Meta.read_only_fields
|
||||
== HybridRideSerializer.Meta.fields
|
||||
)
|
||||
assert HybridRideSerializer.Meta.read_only_fields == HybridRideSerializer.Meta.fields
|
||||
|
||||
def test__serialize__includes_ride_model_fields(self):
|
||||
"""Test serializing includes ride model information."""
|
||||
|
||||
Reference in New Issue
Block a user