mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-05-30 02:50:03 -04:00
21 lines
590 B
Python
21 lines
590 B
Python
import pytest
|
|
|
|
from app.broadcast_areas.models import CustomBroadcastArea
|
|
from tests.app.broadcast_areas.custom_polygons import BRISTOL, SANTA_A, SKYE
|
|
|
|
|
|
@pytest.mark.parametrize(('simple_polygon', 'expected_wards_length'), [
|
|
(SKYE, 2),
|
|
(BRISTOL, 12),
|
|
(SANTA_A, 0) # does not overlap with UK
|
|
])
|
|
def test_custom_broadcast_area_overlapping_electoral_wards(
|
|
simple_polygon,
|
|
expected_wards_length,
|
|
):
|
|
custom_area = CustomBroadcastArea(
|
|
name='foo', polygons=[simple_polygon]
|
|
)
|
|
|
|
assert len(custom_area.overlapping_electoral_wards) == expected_wards_length
|