Skip to content

Commit

Permalink
changed disable_admin_mfa test util func name to disable_mfa
Browse files Browse the repository at this point in the history
  • Loading branch information
bart-maykin committed Feb 16, 2024
1 parent 020fa9c commit deb207e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions maykin_2fa/test/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
)


def disable_admin_mfa():
def disable_mfa():
"""
Test helper to disable MFA requirements in the admin.
Test helper to disable MFA requirements.
Based on :func:`django.test.override_settings`, so you can use it as a decorator
or context manager.
Expand Down Expand Up @@ -50,3 +50,6 @@ def get_valid_totp_token(user: AbstractBaseUser) -> str:
if not isinstance(device, TOTPDevice):
raise ValueError("The user's default device is not a TOTPDevice.")
return _totp_str(device.bin_key)


disable_admin_mfa = disable_mfa

0 comments on commit deb207e

Please sign in to comment.