2022-06-04 08:41:53 +00:00
|
|
|
# -*- coding: utf-8 -*-
|
2024-01-15 20:20:10 +00:00
|
|
|
# type: ignore
|
2022-06-04 08:41:53 +00:00
|
|
|
from django.contrib.auth.models import User
|
|
|
|
import pytest
|
|
|
|
|
2024-01-15 20:20:10 +00:00
|
|
|
from .factories import UserFactory
|
2022-06-04 08:41:53 +00:00
|
|
|
|
|
|
|
|
|
|
|
@pytest.fixture
|
2024-01-15 20:20:10 +00:00
|
|
|
def user(db) -> User:
|
2022-06-04 08:41:53 +00:00
|
|
|
return UserFactory()
|
|
|
|
|
|
|
|
|
|
|
|
@pytest.fixture
|
2024-01-15 20:20:10 +00:00
|
|
|
def inactive_user(db) -> User:
|
2022-06-04 08:41:53 +00:00
|
|
|
return UserFactory(is_active=False)
|
|
|
|
|
|
|
|
|
|
|
|
@pytest.fixture
|
2024-01-15 20:20:10 +00:00
|
|
|
def staff_user(db) -> User:
|
2022-06-04 08:41:53 +00:00
|
|
|
return UserFactory(is_staff=True)
|
|
|
|
|
|
|
|
|
|
|
|
@pytest.fixture
|
2024-01-15 20:20:10 +00:00
|
|
|
def super_user(db) -> User:
|
2022-06-04 08:41:53 +00:00
|
|
|
return UserFactory(is_superuser=True)
|