diff --git a/puzzles/tests.py b/puzzles/tests.py index 39d358eb..fd505834 100644 --- a/puzzles/tests.py +++ b/puzzles/tests.py @@ -152,7 +152,8 @@ def test_sheets_redirect(self): self.assertEqual(response["Location"], puzzle.sheet) response = self.client.get(f"/puzzles/s/0", follow=False) - self.assertEqual(response["Location"], "/") + # If the puzzle doesn't exist we 404 + self.assertEqual(response.status_code, 404) Puzzle.objects.select_for_update().filter(id=puzzle.pk).update(sheet=None) response = self.client.get(f"/puzzles/s/{puzzle.pk}", follow=False)