Files
ai-ticket-platform/backend/tests/conftest.py
2026-07-01 14:09:26 +08:00

14 lines
327 B
Python

import pytest
from django.contrib.auth import get_user_model
@pytest.fixture
def admin_client(client, db):
user = get_user_model().objects.create_superuser(
username="admin-test",
email="admin-test@example.com",
password="admin-test-password",
)
client.force_login(user)
return client