mirror of
https://github.com/GSA/notifications-api.git
synced 2026-09-02 17:48:36 -04:00
Remove weekly stats endpoints
The weekly stats endpoint wont be used once https://github.com/alphagov/notifications-admin/pull/1109 has been merged. It has been replaced with a new monthly endpoint in https://github.com/alphagov/notifications-api/pull/807
This commit is contained in:
@@ -1202,26 +1202,6 @@ def test_get_detailed_service(notify_db, notify_db_session, notify_api, sample_s
|
||||
assert service['statistics']['sms'] == stats
|
||||
|
||||
|
||||
def test_get_weekly_notification_stats(notify_api, notify_db, notify_db_session):
|
||||
with freeze_time('2000-01-01T12:00:00'):
|
||||
noti = create_sample_notification(notify_db, notify_db_session)
|
||||
with notify_api.test_request_context(), notify_api.test_client() as client, freeze_time('2000-01-02T12:00:00'):
|
||||
resp = client.get(
|
||||
'/service/{}/notifications/weekly'.format(noti.service_id),
|
||||
headers=[create_authorization_header()]
|
||||
)
|
||||
|
||||
assert resp.status_code == 200
|
||||
data = json.loads(resp.get_data(as_text=True))['data']
|
||||
assert data == {
|
||||
'1999-12-27': {
|
||||
'sms': {'requested': 1, 'delivered': 0, 'failed': 0},
|
||||
'email': {'requested': 0, 'delivered': 0, 'failed': 0},
|
||||
'letter': {'delivered': 0, 'failed': 0, 'requested': 0}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
'url, expected_status, expected_json', [
|
||||
(
|
||||
|
||||
Reference in New Issue
Block a user