mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-05 10:53:28 -05:00
Use ‘name 1’ when sending yourself a message
We reckon this is better than ‘test name’, ‘test date’, etc.
This commit is contained in:
@@ -166,7 +166,7 @@ def get_example_csv(service_id, template_id):
|
||||
'email': current_user.email_address,
|
||||
'sms': current_user.mobile_number
|
||||
}[template.template_type]
|
||||
] + ["test {}".format(header) for header in template.placeholders])
|
||||
] + _get_fake_personalisation(template.placeholders))
|
||||
return output.getvalue(), 200, {'Content-Type': 'text/csv; charset=utf-8'}
|
||||
|
||||
|
||||
@@ -183,13 +183,11 @@ def send_message_to_self(service_id, template_id):
|
||||
)
|
||||
if template.template_type == 'sms':
|
||||
writer.writerow(
|
||||
[current_user.mobile_number] +
|
||||
["test {}".format(header) for header in template.placeholders]
|
||||
[current_user.mobile_number] + _get_fake_personalisation(template.placeholders)
|
||||
)
|
||||
if template.template_type == 'email':
|
||||
writer.writerow(
|
||||
[current_user.email_address] +
|
||||
["test {}".format(header) for header in template.placeholders]
|
||||
[current_user.email_address] + _get_fake_personalisation(template.placeholders)
|
||||
)
|
||||
|
||||
filedata = {
|
||||
@@ -280,3 +278,9 @@ def start_job(service_id, upload_id):
|
||||
return redirect(
|
||||
url_for('main.view_job', service_id=service_id, job_id=upload_id)
|
||||
)
|
||||
|
||||
|
||||
def _get_fake_personalisation(placeholders):
|
||||
return [
|
||||
"{} 1".format(header) for header in placeholders
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user