import pytest from factories.users import UserFactory @pytest.fixture def user_staff(): """ Create user as staff with data: email = 'admin@example.com' password = 'test' is_staff=True is_active = True is_superuser = True """ admin = UserFactory( last_name='Иванов', first_name='Иван', email='admin@example.com', is_staff=True, is_active=True, is_superuser=True ) return admin @pytest.fixture def user_student(): """ Create user as student with data: email = 'student@example.com' password = 'test' is_active = True """ student = UserFactory( last_name='Иванов', first_name='Иван', email='student@example.com', is_staff=False, is_active=True, ) return student @pytest.fixture def user_not_active_student(): """ Create user as student with data: email = 'notactivestudent@example.com' password = 'test' is_active = False """ student = UserFactory( last_name='Иванов', first_name='Иван', email='notactivestudent@example.com', is_staff=False, is_active=False, ) return student