mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-20 23:41:17 -05:00
Start dual running with "areas" and "names"
For the public API we actually receive a "name" instead of an ID, which we also want to start sending from the Admin app. Unlike IDs, which aren't really used anywhere, we want the names to display the alerts on gov.uk/alerts.
This commit is contained in:
@@ -70,6 +70,9 @@ def create_broadcast():
|
||||
'areas': [
|
||||
area['name'] for area in broadcast_json['areas']
|
||||
],
|
||||
'names': [
|
||||
area['name'] for area in broadcast_json['areas']
|
||||
],
|
||||
'simple_polygons': polygons.smooth.simplify.as_coordinate_pairs_long_lat,
|
||||
},
|
||||
status=BroadcastStatusType.PENDING_APPROVAL,
|
||||
|
||||
@@ -88,7 +88,7 @@ def test_valid_post_cap_xml_broadcast_returns_201(
|
||||
assert response_json['areas'] == [
|
||||
'River Steeping in Wainfleet All Saints'
|
||||
]
|
||||
assert response_json['areas_2']['areas'] == [
|
||||
assert response_json['areas_2']['names'] == [
|
||||
'River Steeping in Wainfleet All Saints'
|
||||
]
|
||||
assert response_json['cancelled_at'] is None
|
||||
|
||||
Reference in New Issue
Block a user