mirror of
https://github.com/GSA/notifications-api.git
synced 2026-01-30 06:21:50 -05:00
Last night we had some letter notifications that were in permanent failure and had page count = 0.
This causes the create-nighlty-billing task to fail. This will make sure that 0 is returned in this case.
This commit is contained in:
@@ -248,6 +248,16 @@ def test_get_rate(notify_db_session):
|
||||
assert letter_rate == Decimal('0.3')
|
||||
|
||||
|
||||
def test_get_rate_for_letters_when_page_count_is_zero(notify_db_session):
|
||||
non_letter_rates, letter_rates = get_rates_for_billing()
|
||||
letter_rate = get_rate(non_letter_rates=non_letter_rates, letter_rates=letter_rates,
|
||||
notification_type='letter',
|
||||
crown=True,
|
||||
letter_page_count=0,
|
||||
date=datetime.utcnow())
|
||||
assert letter_rate == 0
|
||||
|
||||
|
||||
def test_fetch_monthly_billing_for_year(notify_db_session):
|
||||
service = create_service()
|
||||
template = create_template(service=service, template_type="sms")
|
||||
|
||||
Reference in New Issue
Block a user