Remove dependence on domains.yml from static pages

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:12:53 +01:00
parent 718f440720
commit 72f49a9a1e
6 changed files with 50 additions and 20 deletions

View File

@@ -3125,6 +3125,27 @@ def mock_get_organisation(
return mocker.patch('app.organisations_client.get_organisation', side_effect=_get_organisation)
@pytest.fixture(scope='function')
def mock_get_organisation_by_domain(
mocker,
name=False,
crown=True,
agreement_signed=False,
):
def _get_organisation_by_domain(org_id):
return organisation_json(
org_id,
name,
crown=crown,
agreement_signed=agreement_signed,
)
return mocker.patch(
'app.organisations_client.get_organisation_by_domain',
side_effect=_get_organisation_by_domain,
)
@pytest.fixture(scope='function')
def mock_get_service_organisation(mocker):
def _get_service_organisation(service_id):