feat: Implement MFA authentication, add ride statistics model, and update various services, APIs, and tests across the application.

This commit is contained in:
pacnpal
2025-12-28 17:32:53 -05:00
parent aa56c46c27
commit c95f99ca10
452 changed files with 7948 additions and 6073 deletions

View File

@@ -15,24 +15,18 @@ This module provides extensive test coverage for:
Test patterns follow Django styleguide conventions.
"""
import pytest
from unittest.mock import patch, MagicMock
from django.test import TestCase
from django.urls import reverse
from rest_framework import status
from rest_framework.test import APITestCase, APIClient
from rest_framework.test import APIClient
from tests.factories import (
UserFactory,
StaffUserFactory,
SuperUserFactory,
CoasterFactory,
DesignerCompanyFactory,
ManufacturerCompanyFactory,
ParkFactory,
RideFactory,
CoasterFactory,
CompanyFactory,
ManufacturerCompanyFactory,
DesignerCompanyFactory,
RideModelFactory,
StaffUserFactory,
UserFactory,
)
from tests.test_utils import EnhancedAPITestCase
@@ -752,7 +746,7 @@ class TestRideAPIQueryOptimization(EnhancedAPITestCase):
def test__ride_list__uses_select_related(self):
"""Test that ride list uses select_related for optimization."""
# Create multiple rides
for i in range(5):
for _i in range(5):
RideFactory(park=self.park)
response = self.client.get('/api/v1/rides/')