change Recipient to Phone Number

This commit is contained in:
Kenneth Kehl
2024-02-21 10:30:24 -08:00
parent 3363cc6979
commit 96d5e72514
2 changed files with 9 additions and 9 deletions

View File

@@ -71,6 +71,7 @@ def generate_notifications_csv(**kwargs):
if "page" not in kwargs:
kwargs["page"] = 1
# This generates the "batch" csv report
if kwargs.get("job_id"):
original_file_contents = s3download(kwargs["service_id"], kwargs["job_id"])
original_upload = RecipientCSV(
@@ -79,7 +80,7 @@ def generate_notifications_csv(**kwargs):
)
original_column_headers = original_upload.column_headers
fieldnames = [
"Recipient",
"Phone Number",
"Template",
"Sent by",
"Batch File",
@@ -92,9 +93,9 @@ def generate_notifications_csv(**kwargs):
fieldnames.append(header)
else:
# TODO This is deprecated because everything should be a job now, is it ever invoked?
# This generates the "full" csv report
fieldnames = [
"Recipient",
"Phone Number",
"Template",
"Sent by",
"Batch File",
@@ -102,7 +103,6 @@ def generate_notifications_csv(**kwargs):
"Status",
"Time",
]
current_app.logger.warning("Invoking deprecated report format")
yield ",".join(fieldnames) + "\n"

View File

@@ -88,14 +88,14 @@ def get_notifications_csv_mock(
(
None,
[
"Recipient,Template,Sent by,Batch File,Carrier Response,Status,Time\n",
"Phone Number,Template,Sent by,Batch File,Carrier Response,Status,Time\n",
"8005555555,foo,,,Did not like it,Delivered,1943-04-19 08:00:00 AM US/Eastern\r\n",
],
),
(
"Anne Example",
[
"Recipient,Template,Sent by,Batch File,Carrier Response,Status,Time\n",
"Phone Number,Template,Sent by,Batch File,Carrier Response,Status,Time\n",
"8005555555,foo,Anne Example,,Did not like it,Delivered,1943-04-19 08:00:00 AM US/Eastern\r\n", # noqa
],
),
@@ -128,7 +128,7 @@ def test_generate_notifications_csv_without_job(
8005555555
""",
[
"Recipient",
"Phone Number",
"Template",
"Sent by",
"Batch File",
@@ -152,7 +152,7 @@ def test_generate_notifications_csv_without_job(
8005555555, 🐜,🐝,🦀
""",
[
"Recipient",
"Phone Number",
"Template",
"Sent by",
"Batch File",
@@ -182,7 +182,7 @@ def test_generate_notifications_csv_without_job(
"8005555555","🐜,🐜","🐝,🐝","🦀"
""",
[
"Recipient",
"Phone Number",
"Template",
"Sent by",
"Batch File",