Add limits to max/min bleed

This prevents us from giving unrealistically large or small bleed
estimates in case we have areas which are more dense or less dense than
the most/least dense areas we currently have.

Also means we don’t have to treat City of London as a special case.
This commit is contained in:
Chris Hill-Scott
2021-03-19 15:28:13 +00:00
parent 738ac1d818
commit 4367908269
3 changed files with 5 additions and 6 deletions

View File

@@ -315,7 +315,7 @@ def test_phone_density(
@pytest.mark.parametrize('area, expected_bleed_in_m, expected_bleed_in_degrees', (
(
# Islington (most dense in UK)
'lad20-E09000019', 488, 0.00439
'lad20-E09000019', 500, 0.00449
),
(
# Cordwainer Ward (City of London)
@@ -332,7 +332,7 @@ def test_phone_density(
),
(
# Highland (least dense in UK)
'lad20-S12000017', 5_095, 0.0458
'lad20-S12000017', 5_000, 0.0449
),
))
def test_estimated_bleed(

View File

@@ -649,7 +649,7 @@ def test_broadcast_page(
'Islington remove',
], [
'An area of 9.7 square miles Will get the alert',
'An extra area of 4.6 square miles is Likely to get the alert',
'An extra area of 4.7 square miles is Likely to get the alert',
'200,000 to 300,000 phones',
]),
))