From 91576992dd7ac280d2321d36754392a668c345ec Mon Sep 17 00:00:00 2001 From: svlandeg Date: Fri, 23 Aug 2024 16:54:26 +0200 Subject: [PATCH] expand needs_py310 scope --- tests/test_future/test_future_6465.py | 11 +++++------ tests/test_future/test_future_9095.py | 9 ++++----- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/tests/test_future/test_future_6465.py b/tests/test_future/test_future_6465.py index 3277d9809..f300d6dc6 100644 --- a/tests/test_future/test_future_6465.py +++ b/tests/test_future/test_future_6465.py @@ -20,13 +20,12 @@ class Item(BaseModel): tax: Optional[float] = None -@app.get("/items/") -@login_required -def get_item(item_id: int) -> Item: - return Item(name="name", price=42.42) - - @needs_py310 def test_future_6465(): + @app.get("/items/") + @login_required + def get_item(item_id: int) -> Item: + return Item(name="name", price=42.42) + res = client.get("/items?item_id=3") assert res.status_code == 200 diff --git a/tests/test_future/test_future_9095.py b/tests/test_future/test_future_9095.py index c86cdead0..0f59fc7cf 100644 --- a/tests/test_future/test_future_9095.py +++ b/tests/test_future/test_future_9095.py @@ -16,12 +16,11 @@ class Test: return "test" -@app.get("/test/") -def call(test: str = Depends(Test())): - return {"test": test} - - @needs_py310 def test_call(): + @app.get("/test/") + def call(test: str = Depends(Test())): + return {"test": test} + response = client.get("/test") assert response.status_code == 200