@@ -0,0 +1,1003 @@
+# coding: utf-8%0Aimport constance%0Afrom constance.test import override_config%0Afrom django.urls import reverse%0Afrom django.test import TestCase%0A%0A%0Aclass GlobalSettingsTestCase(TestCase):%0A%0A    fixtures = %5B'test_data'%5D%0A%0A    @override_config(MFA_ENABLED=True)%0A    def test_mfa_enabled(self):%0A        self.client.login(username='someuser', password='someuser')%0A        self.assertTrue(constance.config.MFA_ENABLED)%0A        response = self.client.get(reverse('kpi-root'))%0A        lines = %5Bline.strip() for line in response.content.decode().split('%5Cn')%5D%0A        self.assertTrue(%22window.MFAEnabled = true;%22 in lines)%0A%0A    @override_config(MFA_ENABLED=False)%0A    def test_mfa_disabled(self):%0A        self.client.login(username='someuser', password='someuser')%0A        self.assertFalse(constance.config.MFA_ENABLED)%0A        response = self.client.get(reverse('kpi-root'))%0A        lines = %5Bline.strip() for line in response.content.decode().split('%5Cn')%5D%0A        self.assertTrue(%22window.MFAEnabled = false;%22 in lines)%0A

Add test to valide MFA status in JS