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:
Chris Hill-Scott
2017-04-20 14:11:51 +01:00
parent cfc031cfbf
commit 75f5829c1e
5 changed files with 48 additions and 12 deletions

View File

@@ -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):