Unverified Commit 8b15bc35 authored by Nicola Soranzo's avatar Nicola Soranzo
Browse files

Merge branch 'release_24.2' into release_25.0

parents 7a5abce4 ef14b2bc
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -70,12 +70,14 @@ def test_method_order_preserved() -> None:

    app = FastAPI()
    app.include_router(router)
    client = TestClient(app)

    assert TestClient(app).get("/test").json() == 1
    assert TestClient(app).get("/other").json() == 2
    assert client.get("/test").json() == 1
    assert client.get("/other").json() == 2


def test_multiple_decorators() -> None:
    app = FastAPI()
    router = APIRouter()

    @cbv(router)
@@ -90,7 +92,9 @@ def test_multiple_decorators() -> None:
                return {"item_query": item_query}
            return []

    client = TestClient(router)
    app = FastAPI()
    app.include_router(router)
    client = TestClient(app)

    assert client.get("/items").json() == []
    assert client.get("/items/1").json() == {"item_path": "1"}