more cleanup, remove supervisr imports
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
"""Supervisr 2FA Forms"""
|
||||
"""passbook 2FA Forms"""
|
||||
|
||||
from django import forms
|
||||
from django.core.validators import RegexValidator
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{% extends "user/base.html" %}
|
||||
|
||||
{% load supervisr_utils %}
|
||||
{% load utils %}
|
||||
{% load i18n %}
|
||||
{% load hostname %}
|
||||
{% load setting %}
|
||||
@ -31,9 +31,9 @@
|
||||
</p>
|
||||
<p>
|
||||
{% if not state %}
|
||||
<a href="{% url 'supervisr_mod_tfa:tfa-enable' %}" class="btn btn-success btn-sm">{% trans "Enable 2FA" %}</a>
|
||||
<a href="{% url 'passbook_tfa:tfa-enable' %}" class="btn btn-success btn-sm">{% trans "Enable 2FA" %}</a>
|
||||
{% else %}
|
||||
<a href="{% url 'supervisr_mod_tfa:tfa-disable' %}" class="btn btn-danger btn-sm">{% trans "Disable 2FA" %}</a>
|
||||
<a href="{% url 'passbook_tfa:tfa-disable' %}" class="btn btn-danger btn-sm">{% trans "Disable 2FA" %}</a>
|
||||
{% endif %}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{% extends "generic/wizard.html" %}
|
||||
|
||||
{% load supervisr_utils %}
|
||||
{% load utils %}
|
||||
|
||||
{% block title %}
|
||||
{% title "Setup" %}
|
||||
|
||||
@ -1,6 +1,4 @@
|
||||
"""
|
||||
Supervisr Mod 2FA Middleware Test
|
||||
"""
|
||||
"""passbook Mod 2FA Middleware Test"""
|
||||
|
||||
import os
|
||||
|
||||
@ -8,23 +6,19 @@ from django.contrib.auth.models import AnonymousUser
|
||||
from django.test import RequestFactory, TestCase
|
||||
from django.urls import reverse
|
||||
|
||||
from supervisr.core.views import common
|
||||
from supervisr.mod.tfa.middleware import tfa_force_verify
|
||||
from passbook.core.views import common
|
||||
from passbook.tfa.middleware import tfa_force_verify
|
||||
|
||||
|
||||
class TestMiddleware(TestCase):
|
||||
"""
|
||||
Supervisr 2FA Middleware Test
|
||||
"""
|
||||
"""passbook 2FA Middleware Test"""
|
||||
|
||||
def setUp(self):
|
||||
os.environ['RECAPTCHA_TESTING'] = 'True'
|
||||
self.factory = RequestFactory()
|
||||
|
||||
def test_tfa_force_verify_anon(self):
|
||||
"""
|
||||
Test Anonymous TFA Force
|
||||
"""
|
||||
"""Test Anonymous TFA Force"""
|
||||
request = self.factory.get(reverse('common-index'))
|
||||
request.user = AnonymousUser()
|
||||
response = tfa_force_verify(common.IndexView.as_view())(request)
|
||||
|
||||
Reference in New Issue
Block a user