Return postage from the monthly-usage endpoint

We were already returning the month, notification_type, billing_units
and rate from the /monthly-usage billing endpoint. This adds in the
postage too so that we can display postage details on the usage page of
admin.
This commit is contained in:
Katie Smith
2018-09-27 13:58:01 +01:00
parent 0843503b7a
commit 236bbc5f28
4 changed files with 21 additions and 7 deletions

View File

@@ -329,12 +329,14 @@ def test_fetch_monthly_billing_for_year(notify_db_session):
assert results[0].billable_units == Decimal('60')
assert results[0].rate == Decimal('0.162')
assert results[0].notification_type == 'sms'
assert results[0].postage == 'none'
assert str(results[1].month) == "2018-07-01"
assert results[1].notifications_sent == 31
assert results[1].billable_units == Decimal('31')
assert results[1].rate == Decimal('0.158')
assert results[1].notification_type == 'sms'
assert results[1].postage == 'none'
@freeze_time('2018-08-01 13:30:00')