From b13a92fa9a37998569bd17a8bc9787fdc683d219 Mon Sep 17 00:00:00 2001 From: furyhawk Date: Tue, 21 Jan 2025 21:30:30 +0800 Subject: [PATCH] fix: update route filtering to use APIRouter for authorized routes --- app/tests/test_api_router_jwt_errors.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/tests/test_api_router_jwt_errors.py b/app/tests/test_api_router_jwt_errors.py index 446c777..c794c3a 100644 --- a/app/tests/test_api_router_jwt_errors.py +++ b/app/tests/test_api_router_jwt_errors.py @@ -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 ]