diff --git a/app/models/service.py b/app/models/service.py
index ede212422..301e9bd6f 100644
--- a/app/models/service.py
+++ b/app/models/service.py
@@ -46,7 +46,8 @@ class Service(JSONModel):
'consent_to_research',
'count_as_live',
'go_live_user',
- 'go_live_at'
+ 'go_live_at',
+ 'allowed_broadcast_provider',
}
TEMPLATE_TYPES = (
diff --git a/app/templates/withnav_template.html b/app/templates/withnav_template.html
index 81917b052..57cb6ed5e 100644
--- a/app/templates/withnav_template.html
+++ b/app/templates/withnav_template.html
@@ -19,10 +19,14 @@
{{ current_service.name }}
{% if current_service.has_permission('broadcast') %}
{% if current_service.trial_mode %}
- Training
+ Training
{% else %}
- Live
+ Live
{% endif %}
+ {% if current_service.allowed_broadcast_provider %}
+ ({{ current_service.allowed_broadcast_provider }})
+ {% endif %}
+
{% endif %}
Switch service
diff --git a/tests/app/main/views/test_broadcast.py b/tests/app/main/views/test_broadcast.py
index 4e8a3acc4..99c502b92 100644
--- a/tests/app/main/views/test_broadcast.py
+++ b/tests/app/main/views/test_broadcast.py
@@ -192,19 +192,36 @@ def test_broadcast_tour_page_4_shows_service_name(
)
-@pytest.mark.parametrize('trial_mode, selector, expected_text, expected_tagged_text', (
+@pytest.mark.parametrize('trial_mode, allowed_broadcast_provider, selector, expected_text, expected_tagged_text', (
(
True,
+ None,
'.navigation-service-type.navigation-service-type--training',
'service one Training Switch service',
'Training',
),
(
False,
+ None,
'.navigation-service-type.navigation-service-type--live',
'service one Live Switch service',
'Live',
),
+
+ (
+ True,
+ 'vodafone',
+ '.navigation-service-type.navigation-service-type--training',
+ 'service one Training (vodafone) Switch service',
+ 'Training (vodafone)',
+ ),
+ (
+ False,
+ 'vodafone',
+ '.navigation-service-type.navigation-service-type--live',
+ 'service one Live (vodafone) Switch service',
+ 'Live (vodafone)',
+ ),
))
def test_broadcast_service_shows_live_or_training(
client_request,
@@ -212,10 +229,12 @@ def test_broadcast_service_shows_live_or_training(
mock_get_no_broadcast_messages,
mock_get_service_templates_when_no_templates_exist,
trial_mode,
+ allowed_broadcast_provider,
selector,
expected_text,
expected_tagged_text,
):
+ service_one['allowed_broadcast_provider'] = allowed_broadcast_provider
service_one['permissions'] += ['broadcast']
service_one['restricted'] = trial_mode
page = client_request.get(