mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-20 22:40:31 -04:00
Refactor filtering out accepted invites to client
None of our model or view layer code should need to know about accepted invites. We don’t use them anywhere because once an invite is accepted that person is now a user. Putting this logic in the client means that: - none of the code calling the client needs to care about accepted invites - it’s easier to (if we want) update the API code to not return accepted invites
This commit is contained in:
@@ -2174,10 +2174,10 @@ def mock_get_invites_for_service(mocker, service_one, sample_invite):
|
||||
for i in range(0, 5):
|
||||
invite = copy.copy(sample_invite)
|
||||
invite['email_address'] = 'user_{}@testnotify.gov.uk'.format(i)
|
||||
data.append(InvitedUser(**invite))
|
||||
data.append(invite)
|
||||
return data
|
||||
|
||||
return mocker.patch('app.invite_api_client.get_invites_for_service', side_effect=_get_invites)
|
||||
return mocker.patch('app.invite_api_client._get_invites_for_service', side_effect=_get_invites)
|
||||
|
||||
|
||||
@pytest.fixture(scope='function')
|
||||
|
||||
Reference in New Issue
Block a user