diff --git a/tests/base.py b/tests/base.py index d1cd8cd..5618316 100644 --- a/tests/base.py +++ b/tests/base.py @@ -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" - \ No newline at end of file diff --git a/tests/test_login.py b/tests/test_login.py index 4b17433..80b602f 100644 --- a/tests/test_login.py +++ b/tests/test_login.py @@ -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.