mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-04 10:21:14 -05:00
Update /platform-stats to return the data from ft_notification_status, that way the request should not time out for a long date range.
Next steps is to update the query for platform admin stats for all services.
This commit is contained in:
@@ -6,7 +6,7 @@ from freezegun import freeze_time
|
||||
@freeze_time('2018-06-01')
|
||||
def test_get_platform_stats_uses_todays_date_if_no_start_or_end_date_is_provided(admin_request, mocker):
|
||||
today = datetime.now().date()
|
||||
dao_mock = mocker.patch('app.platform_stats.rest.fetch_aggregate_stats_by_date_range_for_all_services')
|
||||
dao_mock = mocker.patch('app.platform_stats.rest.fetch_notification_status_totals_for_all_services')
|
||||
mocker.patch('app.service.rest.statistics.format_statistics')
|
||||
|
||||
admin_request.get('platform_stats.get_platform_stats')
|
||||
@@ -17,7 +17,7 @@ def test_get_platform_stats_uses_todays_date_if_no_start_or_end_date_is_provided
|
||||
def test_get_platform_stats_can_filter_by_date(admin_request, mocker):
|
||||
start_date = date(2017, 1, 1)
|
||||
end_date = date(2018, 1, 1)
|
||||
dao_mock = mocker.patch('app.platform_stats.rest.fetch_aggregate_stats_by_date_range_for_all_services')
|
||||
dao_mock = mocker.patch('app.platform_stats.rest.fetch_notification_status_totals_for_all_services')
|
||||
mocker.patch('app.service.rest.statistics.format_statistics')
|
||||
|
||||
admin_request.get('platform_stats.get_platform_stats', start_date=start_date, end_date=end_date)
|
||||
|
||||
Reference in New Issue
Block a user