mirror of
https://github.com/jazzband/django-defender.git
synced 2026-03-16 22:10:32 +00:00
test_get_view for 100% coverage
This commit is contained in:
parent
465e45a124
commit
1b63b657a1
1 changed files with 9 additions and 0 deletions
|
|
@ -460,3 +460,12 @@ class AccessAttemptTest(TestCase):
|
|||
# doing a get should also get locked out message
|
||||
response = self.client.get(ADMIN_LOGIN_URL)
|
||||
self.assertContains(response, self.LOCKED_MESSAGE)
|
||||
|
||||
def test_get_view(self):
|
||||
""" Check that the decorator doesn't tamper with GET requests"""
|
||||
for i in range(0, config.FAILURE_LIMIT):
|
||||
response = self.client.get(ADMIN_LOGIN_URL)
|
||||
# Check if we are in the same login page
|
||||
self.assertContains(response, LOGIN_FORM_KEY)
|
||||
response = self.client.get(ADMIN_LOGIN_URL)
|
||||
self.assertNotContains(response, self.LOCKED_MESSAGE)
|
||||
|
|
|
|||
Loading…
Reference in a new issue