def METHOD_NAME(self):
    """Case failing gracefully: redirection to homepage when 'next' points to a non-existing page."""
    result = self.client.post(
        self.login_url + "?next=/this_does_not_exist",
        {
            "username": self.correct_username,
            "password": self.correct_password,
            "remember": "remember",
        },
        follow=False,
    )
    self.assertRedirects(result, reverse("homepage"))