Skip to content

Commit

Permalink
Fix FBV tests for newer Django versions
Browse files Browse the repository at this point in the history
  • Loading branch information
dfunckt committed Dec 7, 2018
1 parent 4384e47 commit fcf3711
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/testsuite/contrib/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,10 @@ def test_permission_required(self):
self.assertEqual(force_str(response.content), 'OK')

# Martin can *not* create a book
# Up to Django v2.1, the response was a redirect to login
self.assertTrue(self.client.login(username='martin', password='secr3t'))
response = self.client.get(reverse('cbv.create_book'))
self.assertEqual(response.status_code, 302)
self.assertIn(response.status_code, [302, 403])

# Martin can *not* delete Adrian's book and is redirected to login
self.assertTrue(self.client.login(username='martin', password='secr3t'))
Expand Down

0 comments on commit fcf3711

Please sign in to comment.