1
0
bthlabs-jsonrpc/packages/bthlabs-jsonrpc-django/tests/conftest.py

27 lines
459 B
Python
Raw Normal View History

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