mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-04 10:21:14 -05:00
add a test in service rest
This commit is contained in:
@@ -1959,6 +1959,29 @@ def test_get_all_notifications_for_service_including_ones_made_by_jobs(
|
|||||||
assert response.status_code == 200
|
assert response.status_code == 200
|
||||||
|
|
||||||
|
|
||||||
|
def test_get_monthly_notification_stats_by_user(
|
||||||
|
client,
|
||||||
|
sample_service,
|
||||||
|
sample_user,
|
||||||
|
mocker,
|
||||||
|
):
|
||||||
|
mock_s3 = mocker.patch("app.service.rest.get_phone_number_from_s3")
|
||||||
|
mock_s3.return_value = ""
|
||||||
|
|
||||||
|
mock_s3 = mocker.patch("app.service.rest.get_personalisation_from_s3")
|
||||||
|
mock_s3.return_value = {}
|
||||||
|
|
||||||
|
auth_header = create_admin_authorization_header()
|
||||||
|
|
||||||
|
response = client.get(
|
||||||
|
path=(f"/service/{sample_service.id}/notifications/{sample_user.id}/monthly"),
|
||||||
|
headers=[auth_header],
|
||||||
|
)
|
||||||
|
|
||||||
|
# TODO This test could be a little more complete
|
||||||
|
assert response.status_code == 200
|
||||||
|
|
||||||
|
|
||||||
def test_get_only_api_created_notifications_for_service(
|
def test_get_only_api_created_notifications_for_service(
|
||||||
admin_request,
|
admin_request,
|
||||||
sample_job,
|
sample_job,
|
||||||
|
|||||||
Reference in New Issue
Block a user