Rename
This commit is contained in:
parent
ba46ce5208
commit
56159765d9
|
@ -338,7 +338,7 @@ ALERT_DIRECTORY_DISABLED_ALIAS_CREATION = "alert_directory_disabled_alias_creati
|
||||||
|
|
||||||
ALERT_COMPLAINT_REPLY_PHASE = "alert_complaint_reply_phase"
|
ALERT_COMPLAINT_REPLY_PHASE = "alert_complaint_reply_phase"
|
||||||
ALERT_COMPLAINT_FORWARD_PHASE = "alert_complaint_forward_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"
|
ALERT_QUARANTINE_DMARC = "alert_quarantine_dmarc"
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ from typing import Optional
|
||||||
from app import s3
|
from app import s3
|
||||||
from app.config import (
|
from app.config import (
|
||||||
ALERT_COMPLAINT_REPLY_PHASE,
|
ALERT_COMPLAINT_REPLY_PHASE,
|
||||||
ALERT_COMPLAINT_TO_USER,
|
ALERT_COMPLAINT_TRANSACTIONAL_PHASE,
|
||||||
ALERT_COMPLAINT_FORWARD_PHASE,
|
ALERT_COMPLAINT_FORWARD_PHASE,
|
||||||
)
|
)
|
||||||
from app.email import headers
|
from app.email import headers
|
||||||
|
@ -171,7 +171,7 @@ def report_complaint_to_user_in_transactional_phase(
|
||||||
capitalized_name = origin.name().capitalize()
|
capitalized_name = origin.name().capitalize()
|
||||||
send_email_with_rate_control(
|
send_email_with_rate_control(
|
||||||
user,
|
user,
|
||||||
f"{ALERT_COMPLAINT_TO_USER}_{origin.name()}",
|
f"{ALERT_COMPLAINT_TRANSACTIONAL_PHASE}_{origin.name()}",
|
||||||
user.email,
|
user.email,
|
||||||
f"Abuse report from {capitalized_name}",
|
f"Abuse report from {capitalized_name}",
|
||||||
render(
|
render(
|
||||||
|
|
|
@ -8,7 +8,7 @@ import pytest
|
||||||
from app.config import (
|
from app.config import (
|
||||||
ALERT_COMPLAINT_FORWARD_PHASE,
|
ALERT_COMPLAINT_FORWARD_PHASE,
|
||||||
ALERT_COMPLAINT_REPLY_PHASE,
|
ALERT_COMPLAINT_REPLY_PHASE,
|
||||||
ALERT_COMPLAINT_TO_USER,
|
ALERT_COMPLAINT_TRANSACTIONAL_PHASE,
|
||||||
)
|
)
|
||||||
from app.db import Session
|
from app.db import Session
|
||||||
from app.email import headers
|
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
|
assert len(found) == 0
|
||||||
alerts = SentAlert.filter_by(user_id=user.id).all()
|
alerts = SentAlert.filter_by(user_id=user.id).all()
|
||||||
assert len(alerts) == 1
|
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)
|
@pytest.mark.parametrize("handle_ftor,provider,part_num", origins)
|
||||||
|
|
Loading…
Reference in a new issue