From deb207eeb4b06903b1063b67fa45b9dffc11c83b Mon Sep 17 00:00:00 2001 From: bart-maykin Date: Fri, 16 Feb 2024 15:35:52 +0100 Subject: [PATCH] changed disable_admin_mfa test util func name to disable_mfa --- maykin_2fa/test/__init__.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/maykin_2fa/test/__init__.py b/maykin_2fa/test/__init__.py index 847d5c2..70e2661 100644 --- a/maykin_2fa/test/__init__.py +++ b/maykin_2fa/test/__init__.py @@ -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. @@ -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