1
0
bthlabs-jsonrpc/packages/bthlabs-jsonrpc-django/tests/conftest.py
2024-01-15 20:20:10 +00:00

27 lines
459 B
Python

# -*- coding: utf-8 -*-
# type: ignore
from django.contrib.auth.models import User
import pytest
from .factories import UserFactory
@pytest.fixture
def user(db) -> User:
return UserFactory()
@pytest.fixture
def inactive_user(db) -> User:
return UserFactory(is_active=False)
@pytest.fixture
def staff_user(db) -> User:
return UserFactory(is_staff=True)
@pytest.fixture
def super_user(db) -> User:
return UserFactory(is_superuser=True)