Add a page to show delivery rates week-by-week

Implements
https://github.com/alphagov/notifications-api/pull/286

Will always show weeks as Monday to Sunday.
This commit is contained in:
Chris Hill-Scott
2016-05-03 13:25:22 +01:00
parent afc8fb08f3
commit 50427ecd3f
13 changed files with 170 additions and 35 deletions

View File

@@ -191,6 +191,15 @@ def mock_get_service_statistics(mocker):
'app.statistics_api_client.get_statistics_for_service', side_effect=_create)
@pytest.fixture(scope='function')
def mock_get_aggregate_service_statistics(mocker):
def _create(service_id, limit_days=None):
return {'data': [{}]}
return mocker.patch(
'app.statistics_api_client.get_7_day_aggregate_for_service', side_effect=_create)
@pytest.fixture(scope='function')
def mock_get_service_template(mocker):
def _get(service_id, template_id):