From a36709ccbc0b3e5be34073ebee81d6f1c5cb4e70 Mon Sep 17 00:00:00 2001 From: hanbinli52-sys Date: Wed, 26 Aug 2026 00:54:39 +0800 Subject: [PATCH] fix: make extension-loader isolation test version-agnostic --- backend/tests/test_extensions.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/tests/test_extensions.py b/backend/tests/test_extensions.py index 43decdd..18dd0ba 100644 --- a/backend/tests/test_extensions.py +++ b/backend/tests/test_extensions.py @@ -4,6 +4,7 @@ import types import pytest from fastapi import APIRouter, FastAPI +from fastapi.testclient import TestClient from app.extensions.contracts import ( BACKEND_EXTENSION_API_VERSION, @@ -151,4 +152,6 @@ def test_loader_isolates_failed_setup_and_registers_valid_route( assert registry.extension_ids() == frozenset({"company.valid"}) assert len(errors) == 1 assert errors[0].module == broken.__name__ - assert any(getattr(route, "path", None) == "/api/custom/valid/status" for route in app.routes) + client = TestClient(app) + response = client.get("/api/custom/valid/status") + assert response.status_code == 200