mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-24 09:58:43 -04:00
Move check_messages in admin over to using get notification stats for
day.
This commit is contained in:
@@ -193,6 +193,26 @@ def mock_get_service_statistics(mocker):
|
||||
'app.statistics_api_client.get_statistics_for_service', side_effect=_create)
|
||||
|
||||
|
||||
@pytest.fixture(scope='function')
|
||||
def mock_get_service_statistics_for_day(mocker):
|
||||
|
||||
stats = {'day': datetime.today().date().strftime('%Y-%m-%d'),
|
||||
'emails_delivered': 0,
|
||||
'sms_requested': 0,
|
||||
'sms_delivered': 0,
|
||||
'sms_failed': 0,
|
||||
'emails_requested': 0,
|
||||
'emails_failed': 0,
|
||||
'service': fake_uuid,
|
||||
'id': fake_uuid}
|
||||
|
||||
def _stats(service_id, day):
|
||||
return {'data': stats}
|
||||
|
||||
return mocker.patch(
|
||||
'app.statistics_api_client.get_statistics_for_service_for_day', side_effect=_stats)
|
||||
|
||||
|
||||
@pytest.fixture(scope='function')
|
||||
def mock_get_aggregate_service_statistics(mocker):
|
||||
def _create(service_id, limit_days=None):
|
||||
|
||||
Reference in New Issue
Block a user