mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-21 00:23:53 -04:00
Get organisations list from API rather than config
Hard coding the organisations means this information is duplicated between the admin and the API, and could get out of sync.
This commit is contained in:
@@ -1357,6 +1357,19 @@ def mock_get_organisations(mocker):
|
||||
)
|
||||
|
||||
|
||||
@pytest.fixture(scope='function')
|
||||
def mock_get_letter_organisations(mocker):
|
||||
def _get_organisations():
|
||||
return {
|
||||
'001': 'HM Government',
|
||||
'500': 'Land Registry',
|
||||
}
|
||||
|
||||
return mocker.patch(
|
||||
'app.organisations_client.get_letter_organisations', side_effect=_get_organisations
|
||||
)
|
||||
|
||||
|
||||
@pytest.fixture(scope='function')
|
||||
def mock_get_organisation(mocker):
|
||||
def _get_organisation(id):
|
||||
|
||||
Reference in New Issue
Block a user