Skip to content

Commit

Permalink
Merge pull request #33147 from rldhont/backport-33128-to-release-3_4
Browse files Browse the repository at this point in the history
[Backport release-3_4][Tests][Server] Add WMS GetFeatureInfo GML tests
  • Loading branch information
rldhont committed Nov 29, 2019
2 parents a33da34 + f04cfa8 commit f58e2a1
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tests/src/python/test_qgsserver_wms_getfeatureinfo.py
Expand Up @@ -433,6 +433,26 @@ def testGetFeatureInfoTolerance(self):
'wms_getfeatureinfo_polygon_tolerance_20_text_xml',
'test_project_values.qgz')

def testGetFeatureInfoGML(self):
# Test getfeatureinfo response gml
self.wms_request_compare('GetFeatureInfo',
'&layers=testlayer%20%C3%A8%C3%A9&styles=&' +
'info_format=application%2Fvnd.ogc.gml&transparent=true&' +
'width=600&height=400&srs=EPSG%3A3857&bbox=913190.6389747962%2C' +
'5606005.488876367%2C913235.426296057%2C5606035.347090538&' +
'query_layers=testlayer%20%C3%A8%C3%A9&X=190&Y=320',
'wms_getfeatureinfo-text-gml')

# Test getfeatureinfo response gml with gml
self.wms_request_compare('GetFeatureInfo',
'&layers=testlayer%20%C3%A8%C3%A9&styles=&' +
'info_format=application%2Fvnd.ogc.gml&transparent=true&' +
'width=600&height=400&srs=EPSG%3A3857&bbox=913190.6389747962%2C' +
'5606005.488876367%2C913235.426296057%2C5606035.347090538&' +
'query_layers=testlayer%20%C3%A8%C3%A9&X=190&Y=320&' +
'with_geometry=true',
'wms_getfeatureinfo-text-gml-geometry')

def testGetFeatureInfoPostgresTypes(self):
# compare json list output with file
self.wms_request_compare('GetFeatureInfo',
Expand Down
@@ -0,0 +1,22 @@
*****
Content-Type: application/vnd.ogc.gml; charset=utf-8

<wfs:FeatureCollection xmlns:gml="http://www.opengis.net/gml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ows="http://www.opengis.net/ows" xmlns:qgs="http://qgis.org/gml" xmlns:wfs="http://www.opengis.net/wfs" xmlns:ogc="http://www.opengis.net/ogc" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/wfs.xsd http://qgis.org/gml" xmlns:xlink="http://www.w3.org/1999/xlink">
<gml:featureMember>
<qgs:testlayerèé fid="testlayer èé.2">
<gml:boundedBy>
<gml:Box srsName="EPSG:3857">
<gml:coordinates cs="," ts=" ">913204.9128,5606011.4565 913204.9128,5606011.4565</gml:coordinates>
</gml:Box>
</gml:boundedBy>
<qgs:geometry>
<gml:Point srsName="EPSG:3857">
<gml:coordinates cs="," ts=" ">913204.9128,5606011.4565</gml:coordinates>
</gml:Point>
</qgs:geometry>
<qgs:id>3</qgs:id>
<qgs:name>three</qgs:name>
<qgs:utf8nameè>three èé↓</qgs:utf8nameè>
</qgs:testlayerèé>
</gml:featureMember>
</wfs:FeatureCollection>
17 changes: 17 additions & 0 deletions tests/testdata/qgis_server/wms_getfeatureinfo-text-gml.txt
@@ -0,0 +1,17 @@
*****
Content-Type: application/vnd.ogc.gml; charset=utf-8

<wfs:FeatureCollection xmlns:gml="http://www.opengis.net/gml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ows="http://www.opengis.net/ows" xmlns:qgs="http://qgis.org/gml" xmlns:wfs="http://www.opengis.net/wfs" xmlns:ogc="http://www.opengis.net/ogc" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/wfs.xsd http://qgis.org/gml" xmlns:xlink="http://www.w3.org/1999/xlink">
<gml:featureMember>
<qgs:testlayerèé fid="testlayer èé.2">
<gml:boundedBy>
<gml:Box srsName="EPSG:3857">
<gml:coordinates cs="," ts=" ">913204.9128,5606011.4565 913204.9128,5606011.4565</gml:coordinates>
</gml:Box>
</gml:boundedBy>
<qgs:id>3</qgs:id>
<qgs:name>three</qgs:name>
<qgs:utf8nameè>three èé↓</qgs:utf8nameè>
</qgs:testlayerèé>
</gml:featureMember>
</wfs:FeatureCollection>

0 comments on commit f58e2a1

Please sign in to comment.