From 2543bbe7fe031398745636ec30b5c28ec33ac02c Mon Sep 17 00:00:00 2001 From: Leo Hemsted Date: Tue, 31 May 2022 11:44:18 +0100 Subject: [PATCH] change assertion to specify the fields this'll make it easier to reason about which fields are changing/being removed/etc --- tests/app/dao/test_fact_billing_dao.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tests/app/dao/test_fact_billing_dao.py b/tests/app/dao/test_fact_billing_dao.py index 04812316b..e5eeabf24 100644 --- a/tests/app/dao/test_fact_billing_dao.py +++ b/tests/app/dao/test_fact_billing_dao.py @@ -672,8 +672,16 @@ def test_fetch_sms_billing_for_all_services_for_first_quarter(notify_db_session) create_ft_billing(template=template, bst_date=datetime(2019, 4, 20), billable_unit=44, rate=0.11) results = fetch_sms_billing_for_all_services(datetime(2019, 4, 1), datetime(2019, 5, 30)) assert len(results) == 1 - assert results[0] == (org.name, org.id, service.name, service.id, 25000, Decimal('0.11'), 24956, 44, 0, - Decimal('0')) + assert results[0].organisation_id == org.id + assert results[0].organisation_name == org.name + assert results[0].service_id == service.id + assert results[0].service_name == service.name + assert results[0].chargeable_billable_sms == 0 + assert results[0].sms_billable_units == 44 + assert results[0].free_sms_fragment_limit == 25000 + assert results[0].sms_remainder == 24956 + assert results[0].sms_cost == 0 + assert results[0].sms_rate == 0.11 def test_fetch_sms_billing_for_all_services_with_remainder(notify_db_session):