mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2024-11-22 17:47:08 +03:00
Reverting the use of get_absolute_url method in getting the detail view url. Purpose was to test if the url could be created correctly and not if the view was working correctly.
This commit is contained in:
parent
fa0b278225
commit
1371d6a3e6
|
@ -7,7 +7,10 @@ pytestmark = pytest.mark.django_db
|
|||
|
||||
|
||||
def test_detail(user: User):
|
||||
assert user.get_absolute_url() == f"/users/{user.username}/"
|
||||
assert (
|
||||
reverse("users:detail", kwargs={"username": user.username})
|
||||
== f"/users/{user.username}/"
|
||||
)
|
||||
assert resolve(f"/users/{user.username}/").view_name == "users:detail"
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user