Indicate messages sent with a test key

If a message has been sent with a test key it’s a bit confusing to just
say ‘Delivered’ on the page, because it hasn’t gone to anyone’s phone.

So this commit adds a bit of hint text to disambiguate what ‘Delivered’
actually means in this context.
This commit is contained in:
Chris Hill-Scott
2018-09-06 10:41:59 +01:00
parent 2ddf3d5cfe
commit e4341f5d5b
4 changed files with 28 additions and 11 deletions

View File

@@ -25,6 +25,7 @@ from app import (
notification_api_client,
)
from app.main import main
from app.notify_client.api_key_api_client import KEY_TYPE_TEST
from app.template_previews import get_page_count_for_letter
from app.utils import (
DELIVERED_STATUSES,
@@ -144,7 +145,10 @@ def get_single_notification_partials(notification):
),
'status': render_template(
'partials/notifications/status.html',
notification=notification
notification=notification,
sent_with_test_key=(
notification.get('key_type') == KEY_TYPE_TEST
),
),
}