mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-17 12:29:20 -04:00
Added mock api call to appropriate tests
This commit is contained in:
committed by
Carlo Costino
parent
af119aad1c
commit
591961413a
@@ -321,6 +321,14 @@ def test_route_permissions(
|
||||
route,
|
||||
):
|
||||
with notify_admin.test_request_context():
|
||||
|
||||
def _get(mocker):
|
||||
return {"count": 0}
|
||||
|
||||
mocker.patch(
|
||||
"app.service_api_client.get_global_notification_count", side_effect=_get
|
||||
)
|
||||
|
||||
validate_route_permission(
|
||||
mocker,
|
||||
notify_admin,
|
||||
@@ -346,6 +354,14 @@ def test_route_invalid_permissions(
|
||||
route,
|
||||
):
|
||||
with notify_admin.test_request_context():
|
||||
|
||||
def _get(mocker):
|
||||
return {"count": 0}
|
||||
|
||||
mocker.patch(
|
||||
"app.service_api_client.get_global_notification_count", side_effect=_get
|
||||
)
|
||||
|
||||
validate_route_permission(
|
||||
mocker,
|
||||
notify_admin,
|
||||
|
||||
@@ -1174,6 +1174,14 @@ def test_route_for_service_permissions(
|
||||
mock_get_inbound_sms_summary,
|
||||
):
|
||||
with notify_admin.test_request_context():
|
||||
|
||||
def _get(mocker):
|
||||
return {"count": 0}
|
||||
|
||||
mocker.patch(
|
||||
"app.service_api_client.get_global_notification_count", side_effect=_get
|
||||
)
|
||||
|
||||
validate_route_permission(
|
||||
mocker,
|
||||
notify_admin,
|
||||
|
||||
Reference in New Issue
Block a user