cookiecutter-django/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/tests/test_models.py
Daniel Hillier 0872982245 Fix failing mypy tests in users app with django-stubs (#2395)
Adds django-stubs as a requirement for local virtualenv. This is
required now that the User Model type is being resolved properly.
2020-01-13 01:57:20 +11:00

10 lines
224 B
Python

import pytest
from {{ cookiecutter.project_slug }}.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}/"