mirror of
https://github.com/jazzband/django-axes.git
synced 2026-03-16 22:30:23 +00:00
adding test for different http response code
This commit is contained in:
parent
6858aea99a
commit
2368a7af38
1 changed files with 5 additions and 0 deletions
|
|
@ -677,6 +677,11 @@ class AxesLockoutTestCase(AxesTestCase):
|
|||
response = get_lockout_response(self.request, self.credentials)
|
||||
self.assertEqual(403, response.status_code)
|
||||
|
||||
@override_settings(AXES_HTTP_RESPONSE_CODE=429)
|
||||
def test_get_lockout_response_with_custom_http_response_code(self):
|
||||
response = get_lockout_response(self.request, self.credentials)
|
||||
self.assertEqual(429, response.status_code)
|
||||
|
||||
@override_settings(AXES_LOCKOUT_CALLABLE=mock_get_lockout_response)
|
||||
def test_get_lockout_response_override_callable(self):
|
||||
response = get_lockout_response(self.request, self.credentials)
|
||||
|
|
|
|||
Loading…
Reference in a new issue