refactor: Remove HIBP settings from CMS (#36998)
Remove HIBP settings from CMS common settings module
This commit is contained in:
@@ -8,6 +8,7 @@ import json
|
||||
from unittest import mock
|
||||
from django.contrib.auth.models import User # lint-amnesty, pylint: disable=imported-auth-user
|
||||
from django.test import TestCase
|
||||
from django.test.utils import override_settings
|
||||
from django.urls import reverse
|
||||
|
||||
from common.djangoapps.student.models import UserSignupSource
|
||||
@@ -50,6 +51,8 @@ def fake_get_value(name, default=None):
|
||||
return FAKE_SITE.get(name, default)
|
||||
|
||||
|
||||
# HIBP settings are only defined in lms envs but needed for common tests.
|
||||
@override_settings(ENABLE_AUTHN_REGISTER_HIBP_POLICY=False)
|
||||
class TestSite(TestCase):
|
||||
"""Test for Account Creation from white labeled Sites"""
|
||||
def setUp(self):
|
||||
|
||||
@@ -11,7 +11,11 @@ from django.urls import reverse
|
||||
from common.djangoapps.util.password_policy_validators import create_validator_config
|
||||
|
||||
|
||||
@override_settings(RATELIMIT_ENABLE=False)
|
||||
# HIBP settings are only defined in lms envs but needed for common tests.
|
||||
@override_settings(
|
||||
RATELIMIT_ENABLE=False,
|
||||
ENABLE_AUTHN_REGISTER_HIBP_POLICY=False,
|
||||
)
|
||||
class TestPasswordPolicy(TestCase):
|
||||
"""
|
||||
Go through some password policy tests to make sure things are properly working
|
||||
@@ -227,7 +231,11 @@ class TestPasswordPolicy(TestCase):
|
||||
assert obj['success']
|
||||
|
||||
|
||||
@override_settings(RATELIMIT_ENABLE=False)
|
||||
# HIBP settings are only defined in lms envs but needed for common tests.
|
||||
@override_settings(
|
||||
RATELIMIT_ENABLE=False,
|
||||
ENABLE_AUTHN_REGISTER_HIBP_POLICY=False,
|
||||
)
|
||||
class TestUsernamePasswordNonmatch(TestCase):
|
||||
"""
|
||||
Test that registration username and password fields differ
|
||||
|
||||
Reference in New Issue
Block a user