Removed an update statement to notifications.

It's a small change, but we should remove any db operations that are not necessary.
This commit is contained in:
Rebecca Law
2018-09-20 14:47:24 +01:00
parent 645da3f33d
commit b00308d122
5 changed files with 45 additions and 9 deletions

View File

@@ -40,3 +40,18 @@ def test_create_letter_notification_sets_reference(sample_letter_template, sampl
notification = create_letter_notification(data, sample_letter_template, sample_api_key, NOTIFICATION_CREATED)
assert notification.client_reference == 'foo'
def test_create_letter_notification_sets_billable_units(sample_letter_template, sample_api_key):
data = {
'personalisation': {
'address_line_1': 'The Queen',
'address_line_2': 'Buckingham Palace',
'postcode': 'SW1 1AA',
},
}
notification = create_letter_notification(data, sample_letter_template, sample_api_key, NOTIFICATION_CREATED,
billable_units=3)
assert notification.billable_units == 3