From 5138c2775baaa2a41f4a01128e44f443a4bac9fb Mon Sep 17 00:00:00 2001 From: alex Date: Wed, 18 Dec 2024 19:12:26 +0100 Subject: [PATCH] Changes: - change actually default, something went wrong during splitting the PR --- esmerald/responses/base.py | 2 +- tests/routing/test_proxy_load.py | 2 +- tests/test_responses.py | 14 +++++++------- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/esmerald/responses/base.py b/esmerald/responses/base.py index 485786c4..042d2c28 100644 --- a/esmerald/responses/base.py +++ b/esmerald/responses/base.py @@ -96,7 +96,7 @@ def __init__( The media type used in the response. """ ), - ] = MediaType.JSON, + ] = None, background: Annotated[ Optional[Union["BackgroundTask", "BackgroundTasks"]], Doc( diff --git a/tests/routing/test_proxy_load.py b/tests/routing/test_proxy_load.py index 7786d422..a505fc4d 100644 --- a/tests/routing/test_proxy_load.py +++ b/tests/routing/test_proxy_load.py @@ -33,4 +33,4 @@ def test_can_load_from_proxy(test_client_factory): response = client.get("/esmerald") assert response.status_code == 200 - assert response.text == '"Hello, esmerald"' + assert response.text == "Hello, esmerald" diff --git a/tests/test_responses.py b/tests/test_responses.py index 0ef88b3b..6b7bc083 100644 --- a/tests/test_responses.py +++ b/tests/test_responses.py @@ -52,7 +52,7 @@ def test_override(test_client_factory): with create_client(routes=[Gateway(handler=route_three)]) as client: response = client.get("/three") - assert response.text == '"Ok"' + assert response.text == "Ok" assert response.status_code == status.HTTP_103_EARLY_HINTS @@ -60,7 +60,7 @@ def test_default(test_client_factory): with create_client(routes=[Gateway(handler=route_four)]) as client: response = client.get("/four") - assert response.text == '"Ok"' + assert response.text == "Ok" assert response.status_code == status.HTTP_200_OK @@ -68,7 +68,7 @@ def test_default_decorator(test_client_factory): with create_client(routes=[Gateway(handler=route_five)]) as client: response = client.get("/five") - assert response.text == '"Ok"' + assert response.text == "Ok" assert response.status_code == status.HTTP_207_MULTI_STATUS @@ -92,20 +92,20 @@ def test_multiple(test_client_factory): ) as client: response = client.get("/multi") - assert response.text == '"Ok"' + assert response.text == "Ok" assert response.status_code == status.HTTP_207_MULTI_STATUS response = client.get("/multi/test") - assert response.text == '"Ok"' + assert response.text == "Ok" assert response.status_code == status.HTTP_401_UNAUTHORIZED response = client.get("/multi/esmerald") - assert response.text == '"Ok"' + assert response.text == "Ok" assert response.status_code == status.HTTP_300_MULTIPLE_CHOICES response = client.get("/multi/other") - assert response.text == '"Ok"' + assert response.text == "Ok" assert response.status_code == status.HTTP_207_MULTI_STATUS