You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

42 lines
852 B

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