mirror of
https://github.com/GSA/notifications-api.git
synced 2026-09-04 06:48:26 -04:00
- Only rebuild current month for monthly_billing if today is in the current year.
- Change the usage queries to a union so that billing_units is correct for all notification types. Removing the business logic from the schema. - Added tests for different fragment counts, rates and sheet counts.
This commit is contained in:
@@ -511,3 +511,13 @@ def test_get_yearly_billing_data_for_year_includes_current_day_totals(sample_tem
|
||||
)
|
||||
|
||||
assert billing_data[0].monthly_totals[0]['billing_units'] == 3
|
||||
|
||||
|
||||
@freeze_time("2017-06-16 13:00:00")
|
||||
def test_get_billing_data_for_financial_year_updated_monthly_billing_if_today_is_in_current_year(
|
||||
sample_service,
|
||||
mocker
|
||||
):
|
||||
mock = mocker.patch("app.dao.monthly_billing_dao.create_or_update_monthly_billing")
|
||||
get_billing_data_for_financial_year(sample_service.id, 2016)
|
||||
mock.assert_not_called()
|
||||
|
||||
Reference in New Issue
Block a user