Merge pull request #4183 from alphagov/volume_reports

Report for total notifications sent per day for each channel.
This commit is contained in:
Rebecca Law
2022-03-09 15:15:03 +00:00
committed by GitHub
9 changed files with 305 additions and 0 deletions

View File

@@ -41,3 +41,21 @@ def test_post_free_sms_fragment_limit_for_year_endpoint(mocker, api_user_active)
url='/service/{}/billing/free-sms-fragment-limit'.format(service_id),
data=sms_limit_data
)
def test_get_data_for_volumes_by_service_report(mocker, api_user_active):
mock_get = mocker.patch('app.notify_client.billing_api_client.BillingAPIClient.get')
client = BillingAPIClient()
client.get_data_for_volumes_by_service_report('2022-03-01', '2022-03-31')
mock_get.assert_called_once_with(url='/platform-stats/volumes-by-service',
params={'start_date': '2022-03-01', 'end_date': '2022-03-31'})
def test_get_data_for_daily_volumes_report(mocker, api_user_active):
mock_get = mocker.patch('app.notify_client.billing_api_client.BillingAPIClient.get')
client = BillingAPIClient()
client.get_data_for_daily_volumes_report('2022-03-01', '2022-03-31')
mock_get.assert_called_once_with(url='/platform-stats/daily-volumes-report',
params={'start_date': '2022-03-01', 'end_date': '2022-03-31'})