mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2026-02-05 06:05:18 -05:00
fix: resolve rides API test failures and improve code quality
- Fix E2E live_server fixture (remove broken custom fixture) - Fix Rides API factory mismatch (parks.Company → rides.Company) - Fix duplicate block title in base.html template comment - Fix test URLs for filter-metadata and search-ride-models endpoints - Add fallback labels in SmartRideLoader to prevent ValueError - Update test assertions to match actual API response structure Rides API tests: 38/67 → 67/67 passing
This commit is contained in:
@@ -743,18 +743,11 @@ def bulk_operation_pending(db):
|
||||
# =============================================================================
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def live_server(live_server_url):
|
||||
"""Provide the live server URL for tests.
|
||||
|
||||
Note: This fixture is provided by pytest-django. The live_server_url
|
||||
fixture provides the URL as a string.
|
||||
"""
|
||||
|
||||
class LiveServer:
|
||||
url = live_server_url
|
||||
|
||||
return LiveServer()
|
||||
# NOTE: The live_server fixture is provided by pytest-django.
|
||||
# It has a .url attribute that provides the server URL.
|
||||
# We previously had a custom wrapper here, but it broke because
|
||||
# it depended on a non-existent 'live_server_url' fixture.
|
||||
# The built-in live_server fixture already works correctly.
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
|
||||
Reference in New Issue
Block a user