aboutsummaryrefslogtreecommitdiffstats
path: root/ctrack/users/tests/test_models.py
blob: 54d337fff033fea39a429da522e0d7530373aa74 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import pytest
from django.contrib.auth import get_user_model

from ctrack.organisations.models import Mode, Person, Submode
from ctrack.organisations.tests.factories import (
    OrganisationFactory,
    PersonFactory,
    RoleFactory,
)
from ctrack.users.models import User

pytestmark = pytest.mark.django_db


def test_user_get_absolute_url(user: User):
    assert user.get_absolute_url() == f"/users/{user.username}/"


def test_user_is_person_object(user: User):
    """User comes from ctrack.conftest.
    """
    assert user.oes_user is False