Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
giancarloromeo committed Nov 1, 2024
1 parent 3c1dee5 commit 9641b16
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ async def parse_request_body_as(
except json.decoder.JSONDecodeError as err:
raise web.HTTPBadRequest(reason=f"Invalid json in body: {err}") from err

if hasattr(model_schema_cls, "parse_obj"):
if hasattr(model_schema_cls, "model_validate"):
# NOTE: model_schema can be 'list[T]' or 'dict[T]' which raise TypeError
# with issubclass(model_schema, BaseModel)
assert issubclass(model_schema_cls, BaseModel) # nosec
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ async def test_request_an_account(

response = await client.post(
"/v0/auth/request-account",
json={"form": user_data, "captcha": 123456},
json={"form": user_data, "captcha": "123456"},
)

await assert_status(response, status.HTTP_204_NO_CONTENT)
Expand Down

0 comments on commit 9641b16

Please sign in to comment.