Skip to content

Commit

Permalink
Use current event.id in test instead of fixed one
Browse files Browse the repository at this point in the history
With postgres the event ID can vary. On sqlite it's always 1.
  • Loading branch information
chris34 committed Apr 14, 2024
1 parent b790b9c commit 6759faf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/apps/ikhaya/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ def test_anonymous_no_permission(self):

response = event_delete(request)
self.assertEqual(response.status_code, 302)
self.assertTrue(response.url.endswith("/login/?next=http%3A//testserver/event/1/delete/"))
self.assertTrue(response.url.endswith(f"/login/?next=http%3A//testserver/event/{self.event.id}/delete/"))

def test_displays_form(self):
response = self.client.get(f'/event/{self.event.id}/delete/', follow=True)
Expand Down

0 comments on commit 6759faf

Please sign in to comment.