mirror of
https://github.com/jazzband/django-axes.git
synced 2026-03-16 22:30:23 +00:00
take out test-breaking modifications. My test custom user model wasn't working.
This commit is contained in:
parent
129e93cc0e
commit
2fb772efdb
2 changed files with 1 additions and 20 deletions
|
|
@ -195,11 +195,3 @@ class AxesTestCase(TestCase):
|
|||
self.cool_off()
|
||||
self.check_login()
|
||||
self.check_logout()
|
||||
|
||||
|
||||
class CustomTestUserModel(AbstractBaseUser):
|
||||
class Meta:
|
||||
app_label = "tests"
|
||||
db_table = "auth_user"
|
||||
USERNAME_FIELD = "email"
|
||||
|
||||
|
|
@ -15,7 +15,7 @@ from django.urls import reverse
|
|||
from axes.conf import settings
|
||||
from axes.helpers import get_cache, make_cache_key_list, get_cool_off, get_failure_limit
|
||||
from axes.models import AccessAttempt
|
||||
from tests.base import AxesTestCase, CustomTestUserModel
|
||||
from tests.base import AxesTestCase
|
||||
|
||||
|
||||
class DjangoLoginTestCase(TestCase):
|
||||
|
|
@ -145,17 +145,6 @@ class DatabaseLoginTestCase(AxesTestCase):
|
|||
response, self.LOGIN_FORM_KEY, status_code=self.ALLOWED, html=True
|
||||
)
|
||||
|
||||
@override_settings(AUTH_USER_MODEL='tests.CustomTestUserModel')
|
||||
def test_custom_user_model_login(self):
|
||||
"""
|
||||
Test a valid login for a custom username field on a custom user model.
|
||||
"""
|
||||
|
||||
response = self._login(self.email, self.password)
|
||||
self.assertNotContains(
|
||||
response, self.LOGIN_FORM_KEY, status_code=self.ALLOWED, html=True
|
||||
)
|
||||
|
||||
def test_lockout_limit_once(self):
|
||||
"""
|
||||
Test the login lock trying to login one more time than failure limit.
|
||||
|
|
|
|||
Loading…
Reference in a new issue