1
0
Fork 0
mirror of https://github.com/mealie-recipes/mealie.git synced 2025-08-02 20:15:24 +02:00

feat: Upgrade to Pydantic V2 (#3134)
Some checks are pending
CodeQL / Analyze (javascript-typescript) (push) Waiting to run
CodeQL / Analyze (python) (push) Waiting to run
Docker Nightly Production / Build Tagged Release (push) Blocked by required conditions
Docker Nightly Production / Notify Discord (push) Blocked by required conditions
Docker Nightly Production / Backend Server Tests (push) Waiting to run
Docker Nightly Production / Frontend and End-to-End Tests (push) Waiting to run

* bumped pydantic
This commit is contained in:
Michael Genson 2024-02-11 10:47:37 -06:00 committed by GitHub
parent 248459671e
commit 7a107584c7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
129 changed files with 1138 additions and 833 deletions

View file

@ -16,7 +16,7 @@ def build_unique_user(group: str, api_client: TestClient) -> utils.TestUser:
group = group or random_string(12)
registration = utils.user_registration_factory()
response = api_client.post("/api/users/register", json=registration.dict(by_alias=True))
response = api_client.post("/api/users/register", json=registration.model_dump(by_alias=True))
assert response.status_code == 201
form_data = {"username": registration.username, "password": registration.password}
@ -84,7 +84,7 @@ def g2_user(admin_token, api_client: TestClient):
@fixture(scope="module")
def unique_user(api_client: TestClient):
registration = utils.user_registration_factory()
response = api_client.post("/api/users/register", json=registration.dict(by_alias=True))
response = api_client.post("/api/users/register", json=registration.model_dump(by_alias=True))
assert response.status_code == 201
form_data = {"username": registration.username, "password": registration.password}