mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-02-19 04:50:59 +03:00
Adds django-stubs as a requirement for local virtualenv. This is required now that the User Model type is being resolved properly.
10 lines
224 B
Python
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}/"
|