Skip to content

Commit

Permalink
do things the old way for gadm
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardchalstrey1 committed Jun 5, 2024
1 parent 52b8884 commit ef399c6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions seshat/apps/core/tests/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ def setUp(self):
# Simple square polygon to use in geospatial data table tests
self.square = MultiPolygon(Polygon(((0, 0), (0, 1), (1, 1), (0, 0))))
self.geo_square = '{"type":"MultiPolygon","coordinates":[[[[0,0],[0,1],[1,1],[0,0]]]]}'
self.geo_square_for_gadm = GEOSGeometry(self.square).geojson
self.polity = Polity.objects.create(
name='TestPolity',
id=self.pk,
Expand Down Expand Up @@ -183,11 +184,11 @@ def test_get_provinces(self):
province_result = get_provinces(selected_base_map_gadm='province')
country_result = get_provinces(selected_base_map_gadm='country')

province_expected_result = [{'aggregated_geometry': self.geo_square,
province_expected_result = [{'aggregated_geometry': self.geo_square_for_gadm,
'country': 'Test Country',
'province': 'Test Province',
'province_type': 'Test Type'}]
country_expected_result = [{'aggregated_geometry': self.geo_square,
country_expected_result = [{'aggregated_geometry': self.geo_square_for_gadm,
'country': 'Test Country'}]

self.assertEqual(province_result, province_expected_result)
Expand Down

0 comments on commit ef399c6

Please sign in to comment.