Skip to content

Commit

Permalink
Add unit test for application/geo+json format
Browse files Browse the repository at this point in the history
  • Loading branch information
pblottiere committed Jan 28, 2019
1 parent 80f3334 commit 3b45286
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion tests/src/python/test_qgsserver_wms_getfeatureinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ def testGetFeatureInfoTolerance(self):
'test_project_values.qgz')

def testGetFeatureInfoJSON(self):
# simple test without geometry
# simple test without geometry and info_format=application/json
self.wms_request_compare('GetFeatureInfo',
'&layers=testlayer%20%C3%A8%C3%A9&styles=&' +
'info_format=application%2Fjson&transparent=true&' +
Expand All @@ -442,6 +442,15 @@ def testGetFeatureInfoJSON(self):
'query_layers=testlayer%20%C3%A8%C3%A9&X=190&Y=320',
'wms_getfeatureinfo_json')

# simple test without geometry and info_format=application/geo+json
self.wms_request_compare('GetFeatureInfo',
'&layers=testlayer%20%C3%A8%C3%A9&styles=&' +
'info_format=application%2Fgeo+json&transparent=true&' +
'width=600&height=400&srs=EPSG%3A3857&bbox=913190.6389747962%2C' +
'5606005.488876367%2C913235.426296057%2C5606035.347090538&' +
'query_layers=testlayer%20%C3%A8%C3%A9&X=190&Y=320',
'wms_getfeatureinfo_json')

# test with several features and several layers
self.wms_request_compare('GetFeatureInfo',
'&layers=testlayer%20%C3%A8%C3%A9,fields_alias,exclude_attribute&styles=&' +
Expand Down

0 comments on commit 3b45286

Please sign in to comment.