mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-01 12:19:47 -04:00
Switch to using temporary "areas_2" API field
Depends on: https://github.com/alphagov/notifications-api/pull/3312 This is part of a multi-stage migration where we want to repurpose the "areas" field in the existing API to something like "areas_2".
This commit is contained in:
@@ -696,10 +696,10 @@ def broadcast_message_json(
|
||||
'reference': reference,
|
||||
|
||||
'personalisation': {},
|
||||
'areas': area_ids or [
|
||||
'ctry19-E92000001', 'ctry19-S92000003',
|
||||
],
|
||||
'simple_polygons': simple_polygons or [],
|
||||
'areas_2': {
|
||||
'ids': area_ids or ['ctry19-E92000001', 'ctry19-S92000003'],
|
||||
'simple_polygons': simple_polygons or [],
|
||||
},
|
||||
|
||||
'status': status,
|
||||
|
||||
|
||||
@@ -1395,7 +1395,10 @@ def test_add_broadcast_area(
|
||||
service_id=SERVICE_ONE_ID,
|
||||
broadcast_message_id=fake_uuid,
|
||||
data={
|
||||
'areas': ['ctry19-E92000001', 'ctry19-S92000003', 'ctry19-W92000004'], 'simple_polygons': coordinates
|
||||
'areas_2': {
|
||||
'ids': ['ctry19-E92000001', 'ctry19-S92000003', 'ctry19-W92000004'],
|
||||
'simple_polygons': coordinates
|
||||
}
|
||||
},
|
||||
)
|
||||
|
||||
@@ -1450,12 +1453,14 @@ def test_add_broadcast_sub_area_district_view(
|
||||
service_id=SERVICE_ONE_ID,
|
||||
broadcast_message_id=fake_uuid,
|
||||
data={
|
||||
'simple_polygons': coordinates,
|
||||
'areas': [
|
||||
# These two areas are on the broadcast already
|
||||
'ctry19-E92000001',
|
||||
'ctry19-S92000003',
|
||||
] + expected_selected
|
||||
'areas_2': {
|
||||
'simple_polygons': coordinates,
|
||||
'ids': [
|
||||
# These two areas are on the broadcast already
|
||||
'ctry19-E92000001',
|
||||
'ctry19-S92000003',
|
||||
] + expected_selected
|
||||
}
|
||||
},
|
||||
)
|
||||
|
||||
@@ -1488,14 +1493,16 @@ def test_add_broadcast_sub_area_county_view(
|
||||
service_id=SERVICE_ONE_ID,
|
||||
broadcast_message_id=fake_uuid,
|
||||
data={
|
||||
'simple_polygons': coordinates,
|
||||
'areas': [
|
||||
# These two areas are on the broadcast already
|
||||
'ctry19-E92000001',
|
||||
'ctry19-S92000003',
|
||||
] + [
|
||||
'ctyua19-E10000016'
|
||||
]
|
||||
'areas_2': {
|
||||
'simple_polygons': coordinates,
|
||||
'ids': [
|
||||
# These two areas are on the broadcast already
|
||||
'ctry19-E92000001',
|
||||
'ctry19-S92000003',
|
||||
] + [
|
||||
'ctyua19-E10000016'
|
||||
]
|
||||
}
|
||||
},
|
||||
)
|
||||
|
||||
@@ -1532,8 +1539,10 @@ def test_remove_broadcast_area_page(
|
||||
service_id=SERVICE_ONE_ID,
|
||||
broadcast_message_id=fake_uuid,
|
||||
data={
|
||||
'simple_polygons': coordinates,
|
||||
'areas': ['ctry19-S92000003']
|
||||
'areas_2': {
|
||||
'simple_polygons': coordinates,
|
||||
'ids': ['ctry19-S92000003']
|
||||
},
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user