Add unit test for raster layers and json export

This commit is contained in:
Blottiere Paul 2019-01-18 14:43:52 +00:00
parent 2d8f3d1e93
commit 03447f8034
2 changed files with 24 additions and 0 deletions

View File

@ -480,6 +480,15 @@ class TestQgsServerWMSGetFeatureInfo(TestQgsServerWMSTestBase):
'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',

View File

@ -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"
}]}