Skip to content

Commit

Permalink
Changes:
Browse files Browse the repository at this point in the history
- change actually default, something went wrong during splitting the PR
  • Loading branch information
devkral committed Dec 18, 2024
1 parent 5bb249f commit 5138c27
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion esmerald/responses/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def __init__(
The media type used in the response.
"""
),
] = MediaType.JSON,
] = None,
background: Annotated[
Optional[Union["BackgroundTask", "BackgroundTasks"]],
Doc(
Expand Down
2 changes: 1 addition & 1 deletion tests/routing/test_proxy_load.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
14 changes: 7 additions & 7 deletions tests/test_responses.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,23 +52,23 @@ 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


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


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


Expand All @@ -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

0 comments on commit 5138c27

Please sign in to comment.