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

@@ -13,20 +13,18 @@ Test patterns follow Django styleguide conventions with:
- Permission and authorization testing
"""
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 unittest.mock import patch
from apps.parks.models import Park, ParkPhoto
from rest_framework import status
from rest_framework.test import APIClient
from apps.parks.models import Park
from tests.factories import (
UserFactory,
CompanyFactory,
ParkFactory,
StaffUserFactory,
SuperUserFactory,
ParkFactory,
CompanyFactory,
UserFactory,
)
from tests.test_utils import EnhancedAPITestCase
@@ -471,7 +469,7 @@ class TestParkAPIQueryOptimization(EnhancedAPITestCase):
def test__park_list__uses_select_related(self):
"""Test that park list uses select_related for optimization."""
# Create multiple parks
for i in range(5):
for _i in range(5):
ParkFactory(operator=self.operator)
url = '/api/v1/parks/hybrid/'