mirror of
https://gitlab.com/animath/si/plateforme-corres2math.git
synced 2025-08-21 16:47:22 +02:00
Prevent errors when a not authenticated user tries to see a user detail page
This commit is contained in:
@@ -31,6 +31,10 @@ class TestIndexPage(TestCase):
|
||||
response = self.client.get(reverse("registration:reset_admin"))
|
||||
self.assertRedirects(response, reverse("login") + "?next=" + reverse("registration:reset_admin"), 302, 200)
|
||||
|
||||
User.objects.create()
|
||||
response = self.client.get(reverse("registration:user_detail", args=(1,)))
|
||||
self.assertRedirects(response, reverse("login") + "?next=" + reverse("registration:user_detail", args=(1,)))
|
||||
|
||||
|
||||
class TestRegistration(TestCase):
|
||||
def setUp(self) -> None:
|
||||
|
Reference in New Issue
Block a user