mirror of
https://github.com/GSA/notifications-api.git
synced 2026-01-23 11:01:59 -05:00
Merge pull request #1770 from alphagov/Update_notifification_response_for_precompiled
Update notification response for precompiled
This commit is contained in:
@@ -92,17 +92,10 @@ def post_precompiled_letter_notification():
|
||||
precompiled=True
|
||||
)
|
||||
|
||||
create_resp_partial = functools.partial(
|
||||
create_post_letter_response_from_notification,
|
||||
subject=template.subject,
|
||||
)
|
||||
|
||||
resp = create_resp_partial(
|
||||
notification=notification,
|
||||
content=None,
|
||||
url_root=request.url_root,
|
||||
scheduled_for=None,
|
||||
)
|
||||
resp = {
|
||||
'id': notification.id,
|
||||
'reference': notification.client_reference
|
||||
}
|
||||
|
||||
return jsonify(resp), 201
|
||||
|
||||
|
||||
@@ -758,17 +758,10 @@ 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
|
||||
'reference': 'letter-reference'
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user