Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add unit test for raster layers and json export
  • Loading branch information
pblottiere committed Jan 28, 2019
1 parent 2d8f3d1 commit 03447f8
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/src/python/test_qgsserver_wms_getfeatureinfo.py
Expand Up @@ -480,6 +480,15 @@ def testGetFeatureInfoJSON(self):
'query_layers=exclude_attribute&X=190&Y=320',
'wms_getfeatureinfo_exclude_attribute_json')

# simple test without geometry
self.wms_request_compare('GetFeatureInfo',
'&layers=landsat&styles=&' +
'info_format=application%2Fjson&transparent=true&' +
'width=500&height=500&srs=EPSG%3A3857&' +
'bbox=1989139.6,3522745.0,2015014.9,3537004.5&' +
'query_layers=landsat&X=250&Y=250',
'wms_getfeatureinfo_raster_json')

def testGetFeatureInfoPostgresTypes(self):
# compare json list output with file
self.wms_request_compare('GetFeatureInfo',
Expand Down
15 changes: 15 additions & 0 deletions tests/testdata/qgis_server/wms_getfeatureinfo_raster_json.txt
@@ -0,0 +1,15 @@
*****
Content-Type: application/json; charset=utf-8

{"layers":[{
"name": "landsat",
"Band 1": "125",
"Band 2": "138",
"Band 3": "112",
"Band 4": "75",
"Band 5": "90",
"Band 6": "132",
"Band 7": "165",
"Band 8": "217",
"Band 9": "175"
}]}

0 comments on commit 03447f8

Please sign in to comment.