Pydantic v2 migration

This commit is contained in:
grossmj committed 2023-08-04 18:20:06 +10:00
1 parent 11f51b3809
commit 9c456532d0
46 files changed
+221 -277

No files matched your search

+2 -2
View File
@@ -70,8 +70,8 @@ class TestUserRoutes:
assert user_in_db.username == params["username"]
# check that the user returned in the response is equal to the user in the database
created_user = User(**response.json()).json()
assert created_user == User.from_orm(user_in_db).json()
created_user = User(**response.json()).model_dump_json()
assert created_user == User.model_validate(user_in_db).model_dump_json()
@pytest.mark.parametrize(
"attr, value, status_code",