Skip to content

Commit

Permalink
BGDIDIC-541: Added unit-test for swissboundaries3d-gemeinden hist
Browse files Browse the repository at this point in the history
  • Loading branch information
rebert committed Nov 22, 2023
1 parent 235d689 commit 511421d
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions tests/integration/test_identify_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -630,6 +630,25 @@ def test_identify_timeinstant_zeitreihen(self):

self.assertEqual(resp_1.json['results'][0]['id'], resp_2.json['results'][0]['id'])

def test_identify_timeinstant_swissboundaries3d_gemeinden(self):
# without timeInstant a lot of features should be returned
params = {'geometryFormat': 'geojson',
'geometryType': 'esriGeometryPoint',
'geometry': '614277,188148',
'imageDisplay': '1920,573,96',
'mapExtent': '570727,172398,666727,201048',
'tolerance': '10',
'returnGeometry': 'true',
'layers': 'all:ch.swisstopo.swissboundaries3d-gemeinde-flaeche.fill'}
resp_1 = self.testapp.get('/rest/services/all/MapServer/identify', params=params, headers=accept_headers, status=200)
self.assertEqual(resp_1.content_type, 'application/geo+json')
self.assertGreater(len(resp_1.json['results']), 1)

# with timeInstant one single feature should be returned
params['timeInstant'] = '1888'
resp_2 = self.testapp.get('/rest/services/ech/MapServer/identify', params=params, headers=accept_headers, status=200)
self.assertEqual(len(resp_2.json['results']), 1)

def test_identify_one_timeinstant_several_layers(self):
params = {'geometryType': 'esriGeometryPoint',
'geometry': '630853.8,170647.9',
Expand Down

0 comments on commit 511421d

Please sign in to comment.