Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

changed disable_admin_mfa test util func name to disable_mfa #15

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bart-maykin
Copy link
Contributor

Changing the disable_admin_mfa decorator name to the more accurate name disable_mfa.

Copy link
Member

@sergei-maertens sergei-maertens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some documentation :)

@@ -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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
disable_admin_mfa = disable_mfa
disable_admin_mfa = disable_mfa
"""
Test helper to disable MFA requirements in the admin.
Note that this is the same as :func:`disable_mfa`, because the `user.is_verified`
check is added via middleware which applies to the entire project and not just
the admin. However, this alias exists because maykin-2fa deliberately scopes
itself to managing access to the admin interface. Use the name that best conveys
your intent in your test cases.
"""

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants