Skip to content

Commit

Permalink
Fix pydantic versions
Browse files Browse the repository at this point in the history
  • Loading branch information
tarsil committed Dec 9, 2024
1 parent 315103c commit 8d74a71
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions tests/routing/test_syntax_enum.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from esmerald import Gateway, JSONResponse, get
from esmerald.testclient import create_client

pydantic_version = ".".join(__version__.split(".")[:2])
pydantic_version = __version__


class ItemType(str, Enum):
Expand All @@ -20,14 +20,12 @@ async def item(item_type: ItemType) -> JSONResponse:

def test_syntax():
with create_client(routes=[Gateway(handler=item)]) as client:

response = client.get("/item/sold")
assert response.json() == {"item_type": "sold"}


def test_syntax_fail():
with create_client(routes=[Gateway(handler=item)]) as client:

response = client.get("/item/test")

assert response.status_code == 400
Expand Down
2 changes: 1 addition & 1 deletion tests/security/oauth/test_security_oauth2_optional_desc.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from esmerald.security.oauth2 import OAuth2, OAuth2PasswordRequestFormStrict
from esmerald.testclient import create_client

pydantic_version = __version__[:3]
pydantic_version = __version__

reusable_oauth2 = OAuth2(
flows={
Expand Down

0 comments on commit 8d74a71

Please sign in to comment.