Skip to content

Commit 03447f8

Browse files
committedJan 28, 2019
Add unit test for raster layers and json export
1 parent 2d8f3d1 commit 03447f8

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed
 

‎tests/src/python/test_qgsserver_wms_getfeatureinfo.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -480,6 +480,15 @@ def testGetFeatureInfoJSON(self):
480480
'query_layers=exclude_attribute&X=190&Y=320',
481481
'wms_getfeatureinfo_exclude_attribute_json')
482482

483+
# simple test without geometry
484+
self.wms_request_compare('GetFeatureInfo',
485+
'&layers=landsat&styles=&' +
486+
'info_format=application%2Fjson&transparent=true&' +
487+
'width=500&height=500&srs=EPSG%3A3857&' +
488+
'bbox=1989139.6,3522745.0,2015014.9,3537004.5&' +
489+
'query_layers=landsat&X=250&Y=250',
490+
'wms_getfeatureinfo_raster_json')
491+
483492
def testGetFeatureInfoPostgresTypes(self):
484493
# compare json list output with file
485494
self.wms_request_compare('GetFeatureInfo',
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
*****
2+
Content-Type: application/json; charset=utf-8
3+
4+
{"layers":[{
5+
"name": "landsat",
6+
"Band 1": "125",
7+
"Band 2": "138",
8+
"Band 3": "112",
9+
"Band 4": "75",
10+
"Band 5": "90",
11+
"Band 6": "132",
12+
"Band 7": "165",
13+
"Band 8": "217",
14+
"Band 9": "175"
15+
}]}

0 commit comments

Comments
 (0)
Please sign in to comment.