14 lines
327 B
Python
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
|