mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-05-27 17:39:51 -04:00
Merge pull request #1030 from alphagov/remove-unused-get_all_notificaitons
Removed unused method
This commit is contained in:
@@ -10,15 +10,6 @@ class NotificationApiClient(BaseAPIClient):
|
||||
self.service_id = app.config['ADMIN_CLIENT_USER_NAME']
|
||||
self.api_key = app.config['ADMIN_CLIENT_SECRET']
|
||||
|
||||
def get_all_notifications(self, page=None):
|
||||
params = {}
|
||||
if page is not None:
|
||||
params['page'] = page
|
||||
return self.get(
|
||||
url='/notifications',
|
||||
params=params
|
||||
)
|
||||
|
||||
def get_notifications_for_service(
|
||||
self,
|
||||
service_id,
|
||||
|
||||
@@ -2,20 +2,6 @@ import pytest
|
||||
from app.notify_client.notification_api_client import NotificationApiClient
|
||||
|
||||
|
||||
def test_client_gets_notifications(mocker):
|
||||
|
||||
mock_get = mocker.patch('app.notify_client.notification_api_client.NotificationApiClient.get')
|
||||
NotificationApiClient().get_all_notifications()
|
||||
mock_get.assert_called_once_with(url='/notifications', params={})
|
||||
|
||||
|
||||
def test_client_gets_notifications_with_page(mocker):
|
||||
|
||||
mock_get = mocker.patch('app.notify_client.notification_api_client.NotificationApiClient.get')
|
||||
NotificationApiClient().get_all_notifications(page=99)
|
||||
mock_get.assert_called_once_with(url='/notifications', params={'page': 99})
|
||||
|
||||
|
||||
@pytest.mark.parametrize("arguments,expected_call", [
|
||||
(
|
||||
{},
|
||||
|
||||
Reference in New Issue
Block a user