Files
website-v2/users/tests/test_models.py
Frank Wiles 29878c3f90 Rework versions models
- Added ListView and DetailView
- Move to pytest style tests
- Fix migrations to be clean to rebuild and throw away existing data
- Add model_bakery
2022-05-28 16:00:24 -05:00

24 lines
589 B
Python

from test_plus import TestCase
from django.contrib.auth import get_user_model
from django.utils import timezone
User = get_user_model()
def test_regular_user(user):
assert user.is_active == True
assert user.is_staff == False
assert user.is_superuser == False
def test_staff_user(staff_user):
assert staff_user.is_active == True
assert staff_user.is_staff == True
assert staff_user.is_superuser == False
def test_super_user(super_user):
assert super_user.is_active == True
assert super_user.is_staff == True
assert super_user.is_superuser == True