From a2382e474ae4d090091fa910da8245236b5148ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Alonso=20=C3=81lvarez?= <6095790+dalonsoa@users.noreply.github.com> Date: Thu, 19 Sep 2024 14:17:06 +0100 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Christopher Cave-Ayland --- tests/test_views.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/test_views.py b/tests/test_views.py index c7b2de48..4743e1de 100644 --- a/tests/test_views.py +++ b/tests/test_views.py @@ -18,9 +18,7 @@ def test_login_redirect(self, client): response = client.get(self.endpoint) assert response.status_code == HTTPStatus.FOUND - # AssertRedirects try to match the exact URL, but the URL may contain a query - # string. So, we just check the start of the URL. - assert response.url.startswith(reverse("main:login")) + assertRedirects(response, reverse("main:login") + f"?next={self.endpoint}") class ProcessActionsTest(LoginRequiredTest):