mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-12 09:24:15 -04:00
Limit big numbers to the last 7 days
Implements and depends on: - https://github.com/alphagov/notifications-api/pull/241
This commit is contained in:
@@ -77,7 +77,7 @@ def test_should_show_recent_templates_on_dashboard(app_,
|
||||
|
||||
assert response.status_code == 200
|
||||
response.get_data(as_text=True)
|
||||
mock_get_service_statistics.assert_called_once_with(SERVICE_ONE_ID)
|
||||
mock_get_service_statistics.assert_called_once_with(SERVICE_ONE_ID, limit_days=7)
|
||||
mock_template_stats.assert_called_once_with(SERVICE_ONE_ID)
|
||||
|
||||
page = BeautifulSoup(response.data.decode('utf-8'), 'html.parser')
|
||||
|
||||
@@ -172,7 +172,7 @@ def mock_delete_service(mocker, mock_get_service):
|
||||
|
||||
@pytest.fixture(scope='function')
|
||||
def mock_get_service_statistics(mocker):
|
||||
def _create(service_id):
|
||||
def _create(service_id, limit_days=None):
|
||||
return {'data': [{}]}
|
||||
|
||||
return mocker.patch(
|
||||
|
||||
Reference in New Issue
Block a user