Refactor settings page to use service model

There’s a lot of code in service settings which:
- talks to the API directly through the clients
- passes that information through to the Jinja template

By encapsulating this logic in the service model:
- the Jinja template can access the data directly
- the logic can be reused across multiple methods
This commit is contained in:
Chris Hill-Scott
2018-10-26 17:31:49 +01:00
parent 526f2d7900
commit 1e2608d2e0
12 changed files with 199 additions and 159 deletions

View File

@@ -60,7 +60,7 @@ def mock_get_service_settings_page_common(
'Label Value Action',
'Send text messages On Change',
'Text message sender GOVUK Manage',
'Text message sender GOVUK Change',
'Text messages start with service name On Change',
'International text messages Off Change',
'Receive text messages Off Change',
@@ -82,7 +82,7 @@ def mock_get_service_settings_page_common(
'Label Value Action',
'Send text messages On Change',
'Text message sender GOVUK Manage',
'Text message sender GOVUK Change',
'Text messages start with service name On Change',
'International text messages Off Change',
'Receive text messages Off Change',
@@ -143,7 +143,7 @@ def test_should_show_overview(
'Label Value Action',
'Send text messages On Change',
'Text message sender GOVUK Manage',
'Text message sender GOVUK Change',
'Text messages start with service name On Change',
'International text messages On Change',
'Receive text messages On Change',
@@ -164,7 +164,7 @@ def test_should_show_overview(
'Label Value Action',
'Send text messages On Change',
'Text message sender GOVUK Manage',
'Text message sender GOVUK Change',
'Text messages start with service name On Change',
'International text messages Off Change',
'Receive text messages Off Change',