From d536c682adb38f96c7c1f01bdc93aec5d1cbbb65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Sat, 1 Nov 2025 16:29:04 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=85=20Update=20tests=20for=20dependencies?= =?UTF-8?q?=20with=20yield=20and=20scopes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/test_dependency_yield_scope.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/test_dependency_yield_scope.py b/tests/test_dependency_yield_scope.py index 108d812a7..a5227dd7a 100644 --- a/tests/test_dependency_yield_scope.py +++ b/tests/test_dependency_yield_scope.py @@ -130,21 +130,21 @@ client = TestClient(app) def test_function_scope() -> None: response = client.get("/function-scope") assert response.status_code == 200 - data = json.loads(response.content) + data = response.json() assert data["is_open"] is False def test_request_scope() -> None: response = client.get("/request-scope") assert response.status_code == 200 - data = json.loads(response.content) + data = response.json() assert data["is_open"] is True def test_two_scopes() -> None: response = client.get("/two-scopes") assert response.status_code == 200 - data = json.loads(response.content) + data = response.json() assert data["func_is_open"] is False assert data["req_is_open"] is True @@ -152,7 +152,7 @@ def test_two_scopes() -> None: def test_sub() -> None: response = client.get("/sub") assert response.status_code == 200 - data = json.loads(response.content) + data = response.json() assert data["named_session_open"] is True assert data["session_open"] is True @@ -171,7 +171,7 @@ def test_broken_scope() -> None: def test_named_function_scope() -> None: response = client.get("/named-function-scope") assert response.status_code == 200 - data = json.loads(response.content) + data = response.json() assert data["named_session_open"] is False assert data["session_open"] is False @@ -179,6 +179,6 @@ def test_named_function_scope() -> None: def test_regular_function_scope() -> None: response = client.get("/regular-function-scope") assert response.status_code == 200 - data = json.loads(response.content) + data = response.json() assert data["named_session_open"] is True assert data["session_open"] is False