mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-11-30 15:44:37 -05:00
4
tests/fixtures/fixture_users.py
vendored
4
tests/fixtures/fixture_users.py
vendored
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user