mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-19 19:09:22 +02:00
Cleanup pt 2
This commit is contained in:
parent
be68c8f562
commit
fb834824d6
4 changed files with 4 additions and 11 deletions
|
@ -15,7 +15,7 @@ from django.contrib.contenttypes.models import ContentType
|
|||
from django.urls import reverse
|
||||
from dateutil.relativedelta import relativedelta # type: ignore
|
||||
from epplibwrapper.errors import ErrorCode, RegistryError
|
||||
from waffle.admin import FlagAdmin, SwitchAdmin
|
||||
from waffle.admin import FlagAdmin
|
||||
from waffle.models import Sample
|
||||
from registrar.models import Contact, Domain, DomainRequest, DraftDomain, User, Website
|
||||
from registrar.utility.errors import FSMDomainRequestError, FSMErrorCodes
|
||||
|
|
|
@ -326,20 +326,13 @@ SERVER_EMAIL = "root@get.gov"
|
|||
# endregion
|
||||
|
||||
# region: Waffle feature flags-----------------------------------------------------------###
|
||||
# If Waffle encounters a reference to a flag that is not in the database, should Waffle create the flag?
|
||||
# If Waffle encounters a reference to a flag that is not in the database, create the flag automagically.
|
||||
WAFFLE_CREATE_MISSING_FLAGS = True
|
||||
|
||||
# If Waffle encounters a reference to a switch that is not in the database, should Waffle create the switch?
|
||||
WAFFLE_CREATE_MISSING_SWITCHES = True
|
||||
|
||||
# The model that will be used to keep track of flags. Extends AbstractUserFlag.
|
||||
# Used to replace the default flag class (for customization purposes).
|
||||
WAFFLE_FLAG_MODEL = "registrar.WaffleFlag"
|
||||
|
||||
# The model that will be used to keep track of switches. Extends AbstractBaseSwitch.
|
||||
# Used to replace the default switch class (for customization purposes).
|
||||
WAFFLE_SWITCH_MODEL = "registrar.WaffleSwitch"
|
||||
|
||||
# endregion
|
||||
|
||||
# region: Headers-----------------------------------------------------------###
|
||||
|
|
|
@ -19,7 +19,7 @@ class TestEmails(TestCase):
|
|||
|
||||
@boto3_mocking.patching
|
||||
@override_flag("disable_email_sending", active=True)
|
||||
def test_disable_email_switch(self):
|
||||
def test_disable_email_flag(self):
|
||||
"""Test if the 'disable_email_sending' stops emails from being sent """
|
||||
with boto3_mocking.clients.handler_for("sesv2", self.mock_client_class):
|
||||
expected_message = "Email sending is disabled due to"
|
||||
|
|
|
@ -38,7 +38,7 @@ def send_templated_email(
|
|||
"""
|
||||
|
||||
if flag_is_active(None, "disable_email_sending") and not settings.IS_PRODUCTION:
|
||||
message = "Could not send email. Email sending is disabled due to switch 'disable_email_sending'."
|
||||
message = "Could not send email. Email sending is disabled due to flag 'disable_email_sending'."
|
||||
raise EmailSendingError(message)
|
||||
|
||||
template = get_template(template_name)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue