Skip to content

Commit 12fb3c0

Browse files
authored
1 parent f2cd801 commit 12fb3c0

File tree

2 files changed

+677
-0
lines changed

2 files changed

+677
-0
lines changed

backend/tests/api/conftest.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import random
2+
from collections.abc import AsyncGenerator
23

34
import pytest
45
from fastapi import Request
@@ -49,6 +50,14 @@ def wrapper(user):
4950
return wrapper
5051

5152

53+
@pytest.fixture
54+
async def admin_client(log_client_as, real_db) -> AsyncGenerator[AsyncClient]:
55+
async with setup_users(real_db, 1, is_active=True, is_admin=True) as users:
56+
[admin] = users
57+
58+
yield log_client_as(admin)
59+
60+
5261
@pytest.fixture
5362
def built_request(async_client, request):
5463
url, method = request.param

0 commit comments

Comments
 (0)