diff options
author | Matthew Lemon <y@yulqen.org> | 2024-05-13 17:26:25 +0100 |
---|---|---|
committer | Matthew Lemon <y@yulqen.org> | 2024-05-13 17:26:25 +0100 |
commit | efbbd480ddc62e695123d31c31d233b0df5155bd (patch) | |
tree | bc2fb465edd5050d83c97f280b1aac8e023fe3e5 /pyblackbird_cc/users/tests/test_urls.py |
After first pre-commit processing
Diffstat (limited to '')
-rw-r--r-- | pyblackbird_cc/users/tests/test_urls.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/pyblackbird_cc/users/tests/test_urls.py b/pyblackbird_cc/users/tests/test_urls.py new file mode 100644 index 0000000..e5bdc25 --- /dev/null +++ b/pyblackbird_cc/users/tests/test_urls.py @@ -0,0 +1,19 @@ +from django.urls import resolve +from django.urls import reverse + +from pyblackbird_cc.users.models import User + + +def test_detail(user: User): + assert reverse("users:detail", kwargs={"pk": user.pk}) == f"/users/{user.pk}/" + assert resolve(f"/users/{user.pk}/").view_name == "users:detail" + + +def test_update(): + assert reverse("users:update") == "/users/~update/" + assert resolve("/users/~update/").view_name == "users:update" + + +def test_redirect(): + assert reverse("users:redirect") == "/users/~redirect/" + assert resolve("/users/~redirect/").view_name == "users:redirect" |