This commit is contained in:
Joachim 2021-12-28 21:49:41 +01:00
parent ff3021d1f3
commit 05142f4b73

View file

@ -186,3 +186,12 @@ class UserViews(TestCase):
self.local_user.refresh_from_db() self.local_user.refresh_from_db()
self.assertFalse(self.local_user.show_suggested_users) self.assertFalse(self.local_user.show_suggested_users)
def test_user_redirect(self):
"""test the basic redirect"""
request = self.factory.get("@mouse")
request.user = self.anonymous_user
result = views.user_redirect(request, "mouse")
self.assertEqual(result.status_code, 302)