diff --git a/app/config.py b/app/config.py index 9fcbdb70..fa041a1d 100644 --- a/app/config.py +++ b/app/config.py @@ -338,7 +338,7 @@ ALERT_DIRECTORY_DISABLED_ALIAS_CREATION = "alert_directory_disabled_alias_creati ALERT_COMPLAINT_REPLY_PHASE = "alert_complaint_reply_phase" ALERT_COMPLAINT_FORWARD_PHASE = "alert_complaint_forward_phase" -ALERT_COMPLAINT_TO_USER = "alert_complaint_to_user" +ALERT_COMPLAINT_TRANSACTIONAL_PHASE = "alert_complaint_transactional_phase" ALERT_QUARANTINE_DMARC = "alert_quarantine_dmarc" diff --git a/app/handler/provider_complaint.py b/app/handler/provider_complaint.py index 0eeb181d..ce2befec 100644 --- a/app/handler/provider_complaint.py +++ b/app/handler/provider_complaint.py @@ -7,7 +7,7 @@ from typing import Optional from app import s3 from app.config import ( ALERT_COMPLAINT_REPLY_PHASE, - ALERT_COMPLAINT_TO_USER, + ALERT_COMPLAINT_TRANSACTIONAL_PHASE, ALERT_COMPLAINT_FORWARD_PHASE, ) from app.email import headers @@ -171,7 +171,7 @@ def report_complaint_to_user_in_transactional_phase( capitalized_name = origin.name().capitalize() send_email_with_rate_control( user, - f"{ALERT_COMPLAINT_TO_USER}_{origin.name()}", + f"{ALERT_COMPLAINT_TRANSACTIONAL_PHASE}_{origin.name()}", user.email, f"Abuse report from {capitalized_name}", render( diff --git a/tests/handler/test_provider_complaints.py b/tests/handler/test_provider_complaints.py index b6994e3d..00b9a6a5 100644 --- a/tests/handler/test_provider_complaints.py +++ b/tests/handler/test_provider_complaints.py @@ -8,7 +8,7 @@ import pytest from app.config import ( ALERT_COMPLAINT_FORWARD_PHASE, ALERT_COMPLAINT_REPLY_PHASE, - ALERT_COMPLAINT_TO_USER, + ALERT_COMPLAINT_TRANSACTIONAL_PHASE, ) from app.db import Session from app.email import headers @@ -51,7 +51,7 @@ def test_provider_to_user(flask_client, handle_ftor, provider, part_num): assert len(found) == 0 alerts = SentAlert.filter_by(user_id=user.id).all() assert len(alerts) == 1 - assert alerts[0].alert_type == f"{ALERT_COMPLAINT_TO_USER}_{provider}" + assert alerts[0].alert_type == f"{ALERT_COMPLAINT_TRANSACTIONAL_PHASE}_{provider}" @pytest.mark.parametrize("handle_ftor,provider,part_num", origins)