# User view refactoring
* refactors majority of user views into class based views * introduces BaseModalFormView and BaseView for even more generic usage * renames url identifier user:index into user:detail for more clarity
This commit is contained in:
@@ -26,7 +26,7 @@ class UserViewTestCase(BaseViewTestCase):
|
||||
self.team.users.add(self.superuser)
|
||||
self.team.admins.add(self.superuser)
|
||||
# Prepare urls
|
||||
self.index_url = reverse("user:index", args=())
|
||||
self.index_url = reverse("user:detail", args=())
|
||||
self.notification_url = reverse("user:notifications", args=())
|
||||
self.api_token_url = reverse("user:api-token", args=())
|
||||
self.contact_url = reverse("user:contact", args=(self.superuser.id,))
|
||||
|
||||
@@ -233,7 +233,7 @@ class UserNotificationFormTestCase(BaseTestCase):
|
||||
self.assertEqual(form.form_title, str(_("Edit notifications")))
|
||||
self.assertEqual(form.form_caption, "")
|
||||
self.assertEqual(form.action_url, reverse("user:notifications"))
|
||||
self.assertEqual(form.cancel_redirect, reverse("user:index"))
|
||||
self.assertEqual(form.cancel_redirect, reverse("user:detail"))
|
||||
|
||||
def test_save(self):
|
||||
selected_notification = UserNotification.objects.first()
|
||||
|
||||
Reference in New Issue
Block a user