Remove support for old "areas" sub-field

All broadcasts with this field have now been migrated to use "ids".

This also removes a few lines that were missed in previous PRs:

- Added by mistake: fd7ebbebb0 (diff-045554136e1462693a6cbb6328b2e056a81e8b348e94575edd8f72b78c5da96eR115)
- Missed removal: ec1171f85c (diff-045554136e1462693a6cbb6328b2e056a81e8b348e94575edd8f72b78c5da96eR110)
This commit is contained in:
Ben Thorner
2021-09-06 12:28:47 +01:00
parent 6af39c4d3b
commit dd41cf854c
3 changed files with 3 additions and 18 deletions

View File

@@ -19,13 +19,7 @@ from tests.app.db import (
)
# TEMPORARY: while we repurpose "areas"
@pytest.mark.parametrize("area_data", [
{"areas": ["place A", "region B"]},
{"ids": ["place A", "region B"]},
])
def test_get_broadcast_message(
area_data,
admin_request,
sample_broadcast_service
):
@@ -37,7 +31,7 @@ def test_get_broadcast_message(
bm = create_broadcast_message(
t,
areas={
**area_data,
"ids": ["place A", "region B"],
"simple_polygons": [[[50.1, 1.2], [50.12, 1.2], [50.13, 1.2]]],
},
personalisation={
@@ -64,13 +58,7 @@ def test_get_broadcast_message(
assert response['personalisation'] == {'thing': 'test'}
# TEMPORARY: while we repurpose "areas"
@pytest.mark.parametrize("area_data", [
{"areas": ["place A", "region B"]},
{"ids": ["place A", "region B"]},
])
def test_get_broadcast_message_without_template(
area_data,
admin_request,
sample_broadcast_service
):
@@ -78,7 +66,7 @@ def test_get_broadcast_message_without_template(
service=sample_broadcast_service,
content='emergency broadcast content',
areas={
**area_data,
"ids": ["place A", "region B"],
"simple_polygons": [[[50.1, 1.2], [50.12, 1.2], [50.13, 1.2]]],
},
)