mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-20 14:29:51 -04:00
broadcast-areas: initial repository class
repository to represent the sqlite broadcast areas db Signed-off-by: Toby Lorne <toby.lornewelch-richards@digital.cabinet-office.gov.uk>
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
import pytest
|
||||
import re
|
||||
from json import JSONDecodeError
|
||||
from unittest import mock
|
||||
|
||||
from notifications_utils.broadcast_areas import (
|
||||
BroadcastAreaLibraries,
|
||||
BroadcastAreasRepository,
|
||||
broadcast_area_libraries,
|
||||
load_geojson_file,
|
||||
)
|
||||
@@ -156,3 +158,9 @@ def test_lat_long_order():
|
||||
assert len(lat_long[0]) == len(long_lat[0]) == 2082 # Coordinates in polygon
|
||||
assert len(lat_long[0][0]) == len(long_lat[0][0]) == 2 # Axes in coordinates
|
||||
assert lat_long[0][0] == list(reversed(long_lat[0][0]))
|
||||
|
||||
|
||||
def test_includes_electoral_wards():
|
||||
|
||||
areas = broadcast_area_libraries.get_areas('city-of-london---aldgate')
|
||||
assert len(areas) == 1
|
||||
|
||||
Reference in New Issue
Block a user