diff --git a/app/experimenter/experiments/tests/test_views.py b/app/experimenter/experiments/tests/test_views.py index 3ccf4b9ba..637d6d998 100644 --- a/app/experimenter/experiments/tests/test_views.py +++ b/app/experimenter/experiments/tests/test_views.py @@ -787,6 +787,11 @@ class TestNimbusUIView(TestCase): class Test404View(TestCase): def test_404(self): user_email = "user@example.com" - response = self.client.get("/404", **{settings.OPENIDC_EMAIL_HEADER: user_email}) + response = self.client.get( + # test path should be a string that doesn't match any existing url patterns + # or django will attempt to 301 and append a slash before 404ing + "/invalid/", + **{settings.OPENIDC_EMAIL_HEADER: user_email}, + ) self.assertTemplateUsed(response, "nimbus/404.html") self.assertEqual(response.status_code, 404)