Skip to content

Commit

Permalink
Modify test
Browse files Browse the repository at this point in the history
  • Loading branch information
rgossiaux committed Dec 15, 2024
1 parent 352dbf6 commit d04c07a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion puzzles/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit d04c07a

Please sign in to comment.