mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-16 20:49:00 -04:00
Use statistics for returned letters on dashboard
This should be faster and more accurate than querying all the reports.
This commit is contained in:
@@ -335,6 +335,25 @@ def test_client_returns_count_of_service_templates(
|
||||
],
|
||||
{'data_from': 'api'},
|
||||
),
|
||||
(
|
||||
service_api_client.get_returned_letter_statistics,
|
||||
[SERVICE_ONE_ID],
|
||||
[
|
||||
call('service-{}-returned-letters-statistics'.format(SERVICE_ONE_ID))
|
||||
],
|
||||
None,
|
||||
[
|
||||
call('service/{}/returned-letter-statistics'.format(SERVICE_ONE_ID))
|
||||
],
|
||||
[
|
||||
call(
|
||||
'service-{}-returned-letters-statistics'.format(SERVICE_ONE_ID),
|
||||
'{"data_from": "api"}',
|
||||
ex=604800,
|
||||
)
|
||||
],
|
||||
{'data_from': 'api'},
|
||||
),
|
||||
]
|
||||
)
|
||||
def test_returns_value_from_cache(
|
||||
|
||||
Reference in New Issue
Block a user