mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-08 00:05:09 -04:00
Add unit test for raster layers and json export
This commit is contained in:
parent
2d8f3d1e93
commit
03447f8034
@ -480,6 +480,15 @@ class TestQgsServerWMSGetFeatureInfo(TestQgsServerWMSTestBase):
|
|||||||
'query_layers=exclude_attribute&X=190&Y=320',
|
'query_layers=exclude_attribute&X=190&Y=320',
|
||||||
'wms_getfeatureinfo_exclude_attribute_json')
|
'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):
|
def testGetFeatureInfoPostgresTypes(self):
|
||||||
# compare json list output with file
|
# compare json list output with file
|
||||||
self.wms_request_compare('GetFeatureInfo',
|
self.wms_request_compare('GetFeatureInfo',
|
||||||
|
15
tests/testdata/qgis_server/wms_getfeatureinfo_raster_json.txt
vendored
Normal file
15
tests/testdata/qgis_server/wms_getfeatureinfo_raster_json.txt
vendored
Normal 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"
|
||||||
|
}]}
|
Loading…
x
Reference in New Issue
Block a user