Skip to content
Permalink
Browse files

Add unit tests

  • Loading branch information
pblottiere committed Sep 28, 2020
1 parent 86175e3 commit cd2032ff4569f32f1a925ede267fc1e3d69bf1d6
@@ -802,6 +802,49 @@ def testGetFeatureInfoCascadingLayers(self):
'wms_getfeatureinfo_cascading_issue31177',
project_name)

def testGetFeatureInfoRasterNoData(self):
# out
self.wms_request_compare('GetFeatureInfo',
'&BBOX=-39.43236293126383885,135.95002698514588246,-30.54405018572365194,156.29582900705395332' +
'&CRS=EPSG:4326' +
'&VERSION=1.3.0' +
'&WIDTH=800&HEIGHT=400' +
'&LAYERS=requires_warped_vrt' +
'&QUERY_LAYERS=requires_warped_vrt' +
'&I=1&J=1' +
'&FEATURE_COUNT=10',
'wms_getfeatureinfo_raster_nodata_out',
'test_raster_nodata.qgz',
normalizeJson=True)

# 0
self.wms_request_compare('GetFeatureInfo',
'&BBOX=-39.43236293126383885,135.95002698514588246,-30.54405018572365194,156.29582900705395332' +
'&CRS=EPSG:4326' +
'&VERSION=1.3.0' +
'&WIDTH=800&HEIGHT=400' +
'&LAYERS=requires_warped_vrt' +
'&QUERY_LAYERS=requires_warped_vrt' +
'&I=576&J=163' +
'&FEATURE_COUNT=10',
'wms_getfeatureinfo_raster_nodata_zero',
'test_raster_nodata.qgz',
normalizeJson=True)

# nodata
self.wms_request_compare('GetFeatureInfo',
'&BBOX=-39.43236293126383885,135.95002698514588246,-30.54405018572365194,156.29582900705395332' +
'&CRS=EPSG:4326' +
'&VERSION=1.3.0' +
'&WIDTH=800&HEIGHT=400' +
'&LAYERS=requires_warped_vrt' +
'&QUERY_LAYERS=requires_warped_vrt' +
'&I=560&J=78' +
'&FEATURE_COUNT=10',
'wms_getfeatureinfo_raster_nodata',
'test_raster_nodata.qgz',
normalizeJson=True)


if __name__ == '__main__':
unittest.main()
Binary file not shown.
@@ -0,0 +1,8 @@
*****
Content-Type: text/plain; charset=utf-8

GetFeatureInfo results

Layer 'requires_warped_vrt'
Band 1 = 'no data'

@@ -0,0 +1,7 @@
*****
Content-Type: text/plain; charset=utf-8

GetFeatureInfo results

Layer 'requires_warped_vrt'

@@ -0,0 +1,8 @@
*****
Content-Type: text/plain; charset=utf-8

GetFeatureInfo results

Layer 'requires_warped_vrt'
Band 1 = '0'

0 comments on commit cd2032f

Please sign in to comment.
You can’t perform that action at this time.