mirror of
https://github.com/hay-kot/mealie.git
synced 2025-08-22 06:23:34 -07:00
add admin fixture
This commit is contained in:
parent
d99285fe75
commit
2508f9b1ed
1 changed files with 7 additions and 0 deletions
7
tests/fixtures/fixture_users.py
vendored
7
tests/fixtures/fixture_users.py
vendored
|
@ -226,6 +226,13 @@ def unique_user(session: Session, api_client: TestClient):
|
||||||
yield from _unique_user(session, api_client)
|
yield from _unique_user(session, api_client)
|
||||||
|
|
||||||
|
|
||||||
|
@fixture(scope="module")
|
||||||
|
def unique_admin(session: Session, api_client: TestClient, unique_user: utils.TestUser):
|
||||||
|
admin_user = next(_unique_user(session, api_client))
|
||||||
|
admin_user.repos.users.patch(admin_user.user_id, {"admin": True, "group_id": unique_user.group_id})
|
||||||
|
yield admin_user
|
||||||
|
|
||||||
|
|
||||||
@fixture(scope="module")
|
@fixture(scope="module")
|
||||||
def user_tuple(session: Session, admin_token, api_client: TestClient) -> Generator[list[utils.TestUser], None, None]:
|
def user_tuple(session: Session, admin_token, api_client: TestClient) -> Generator[list[utils.TestUser], None, None]:
|
||||||
group_name = utils.random_string()
|
group_name = utils.random_string()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue