Remove dependence on domains.yml from settings

Settings looked at `domains.yml` when users were making go live requests
or email branding requests.

This will allow us to remove the `domains.yml` file, by using
information about organisations that is now stored in the database
instead.
This commit is contained in:
Chris Hill-Scott
2019-04-04 11:23:40 +01:00
parent 835d11d8d6
commit 3565ffc33f
6 changed files with 72 additions and 54 deletions

View File

@@ -3145,9 +3145,19 @@ def mock_get_organisation_by_domain(
@pytest.fixture(scope='function')
def mock_get_service_organisation(mocker):
def mock_get_service_organisation(
mocker,
name=False,
crown=True,
agreement_signed=None,
):
def _get_service_organisation(service_id):
return organisation_json('7aa5d4e9-4385-4488-a489-07812ba13383', 'Org 1')
return organisation_json(
'7aa5d4e9-4385-4488-a489-07812ba13383',
name,
crown=crown,
agreement_signed=agreement_signed,
)
return mocker.patch('app.organisations_client.get_service_organisation', side_effect=_get_service_organisation)