diff --git a/app/v2/notifications/post_notifications.py b/app/v2/notifications/post_notifications.py index 7963ee8ce..9cf8b0cbf 100644 --- a/app/v2/notifications/post_notifications.py +++ b/app/v2/notifications/post_notifications.py @@ -104,6 +104,9 @@ def post_precompiled_letter_notification(): scheduled_for=None, ) + # Precompile should be the same as a letter without the template as its auto generated + resp.pop('template', None) + return jsonify(resp), 201 diff --git a/tests/app/v2/notifications/test_post_notifications.py b/tests/app/v2/notifications/test_post_notifications.py index dc7bc173d..aa728c383 100644 --- a/tests/app/v2/notifications/test_post_notifications.py +++ b/tests/app/v2/notifications/test_post_notifications.py @@ -758,16 +758,12 @@ def test_post_precompiled_letter_notification_returns_201(client, notify_user, m assert notification.billable_units == 3 resp_json = json.loads(response.get_data(as_text=True)) + assert resp_json == { 'content': {'body': None, 'subject': 'Pre-compiled PDF'}, 'id': str(notification.id), 'reference': 'letter-reference', 'scheduled_for': None, - 'template': { - 'id': ANY, - 'uri': ANY, - 'version': 1 - }, 'uri': ANY }