Skip to content

Commit 493dcf9

Browse files
build(deps): bump pydantic from 2.1.1 to 2.2.0 (#773)
Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Sam Bull <[email protected]>
1 parent f18ee64 commit 493dcf9

File tree

2 files changed

+9
-14
lines changed

2 files changed

+9
-14
lines changed

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ aiohttp-security==0.4.0
44
aiohttp-session[secure]==2.12.0
55
aiosqlite==0.19.0
66
cryptography==41.0.3
7-
pydantic==2.1.1
7+
pydantic==2.2.0
88
pytest==7.4.0
99
pytest-aiohttp==1.0.4
1010
pytest-cov==4.1.0

tests/test_security.py

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -91,19 +91,14 @@ async def test_login_invalid_payload(admin_client: TestClient) -> None:
9191
url = admin_client.app["admin"].router["token"].url_for()
9292
async with admin_client.post(url, json={"foo": "bar", "password": None}) as resp:
9393
assert resp.status == 400
94-
assert await resp.json() == [{
95-
"loc": ["username"],
96-
"msg": "Field required",
97-
"type": "missing",
98-
"input": {"foo": "bar", "password": None},
99-
"url": "https://errors.pydantic.dev/2.1/v/missing"
100-
}, {
101-
"loc": ["password"],
102-
"msg": "Input should be a valid string",
103-
"type": "string_type",
104-
"input": None,
105-
"url": "https://errors.pydantic.dev/2.1/v/string_type"
106-
}]
94+
result = await resp.json()
95+
assert len(result) == 2
96+
assert result[0]["loc"] == ["username"]
97+
assert result[0]["msg"] == "Field required"
98+
assert result[0]["input"] == {"foo": "bar", "password": None}
99+
assert result[1]["loc"] == ["password"]
100+
assert result[1]["msg"] == "Input should be a valid string"
101+
assert result[1]["input"] is None
107102

108103

109104
async def test_list_without_permission(create_admin_client: _CreateClient, # type: ignore[no-any-unimported] # noqa: B950

0 commit comments

Comments
 (0)