Fix mock_get_organisation_by_domain and mock_get_service_organisation

This commits stops the `mock_get_organisation_by_domain` and
`mock_get_service_organisation` fixtures from being called like
functions.
This commit is contained in:
Katie Smith
2019-12-20 15:02:47 +00:00
parent 41d33b2995
commit 6bc4f1898f
3 changed files with 24 additions and 23 deletions

View File

@@ -7,11 +7,7 @@ from flask import url_for
from freezegun import freeze_time
from tests import organisation_json
from tests.conftest import (
SERVICE_ONE_ID,
mock_get_service_organisation,
normalize_spaces,
)
from tests.conftest import SERVICE_ONE_ID, normalize_spaces
class _MockS3Object():
@@ -94,11 +90,12 @@ def test_show_agreement_page(
crown,
expected_links,
):
mock_get_service_organisation(
mocker,
org = organisation_json(
crown=crown,
agreement_signed=agreement_signed,
agreement_signed=agreement_signed
)
mocker.patch('app.organisations_client.get_service_organisation', return_value=org)
page = client_request.get('main.service_agreement', service_id=SERVICE_ONE_ID)
links = page.select('main .column-five-sixths a')
assert len(links) == len(expected_links)