Use service model to look up service attributes

This is better than just keying into the JSON because it means you get
an exception straight away when looking up a key that doesn’t exist
(which via mocking you could ordinarily miss).
This commit is contained in:
Chris Hill-Scott
2018-07-20 08:42:01 +01:00
parent 036923c382
commit 1304561a70
14 changed files with 147 additions and 77 deletions

View File

@@ -487,6 +487,7 @@ def test_should_validate_whitelist_items(
def test_callback_forms_validation(
client_request,
service_one,
mock_get_valid_service_callback_api,
endpoint,
url,
bearer_token,
@@ -606,7 +607,8 @@ def test_callbacks_button_links_straight_to_delivery_status_if_service_has_no_in
def test_callbacks_page_redirects_to_delivery_status_if_service_has_no_inbound_sms(
client_request,
service_one,
mocker
mocker,
mock_get_valid_service_callback_api,
):
page = client_request.get(
'main.api_callbacks',