fix: update route filtering to use APIRouter for authorized routes

This commit is contained in:
2025-01-21 21:30:30 +08:00
parent dff011e7af
commit b13a92fa9a
+2 -2
View File
@@ -1,5 +1,5 @@
import pytest
from fastapi import APIRoute, routing, status
from fastapi import APIRouter, routing, status
from freezegun import freeze_time
from httpx import AsyncClient
from sqlalchemy import delete
@@ -13,7 +13,7 @@ from app.models import User
authorized_routes = [
route
for route in api_router.routes
if isinstance(route, APIRoute) and route.tags and "users" in route.tags
if isinstance(route, APIRouter) and route.tags and "users" in route.tags
]