mirror of
https://github.com/jazzband/django-axes.git
synced 2026-05-10 16:44:45 +00:00
25 lines
644 B
Python
25 lines
644 B
Python
from axes.handlers.base import AxesHandler
|
|
|
|
|
|
class AxesTestHandler(AxesHandler): # pylint: disable=unused-argument
|
|
"""
|
|
Signal handler implementation that does nothing, ideal for a test suite.
|
|
"""
|
|
|
|
def reset_attempts(
|
|
self,
|
|
*,
|
|
ip_address: str = None,
|
|
username: str = None,
|
|
ip_or_username: bool = False,
|
|
) -> int:
|
|
return 0
|
|
|
|
def reset_logs(self, *, age_days: int = None) -> int:
|
|
return 0
|
|
|
|
def is_allowed(self, request, credentials: dict = None) -> bool:
|
|
return True
|
|
|
|
def get_failures(self, request, credentials: dict = None) -> int:
|
|
return 0
|