Add unittest for featureinfo request using the parameter with_geometry

This commit is contained in:
Marco Hugentobler 2017-10-26 16:10:40 +02:00
parent 49a1a5a09f
commit 7d84782546
2 changed files with 31 additions and 0 deletions

View File

@ -92,6 +92,16 @@ class TestQgsServerWMS(QgsServerTestBase):
'5606005.488876367%2C913235.426296057%2C5606035.347090538&' +
'query_layers=testlayer%20%C3%A8%C3%A9&X=190&Y=320',
'wms_getfeatureinfo-text-html')
#Test getfeatureinfo response html with geometry
self.wms_request_compare('GetFeatureInfo',
'&layers=testlayer%20%C3%A8%C3%A9&styles=&' +
'info_format=text%2Fhtml&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-html-geometry')
# Test getfeatureinfo response text
self.wms_request_compare('GetFeatureInfo',

View File

@ -0,0 +1,21 @@
Content-Length: 512
Content-Type: text/html; charset=utf-8
<HEAD>
<TITLE> GetFeatureInfo results </TITLE>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
</HEAD>
<BODY>
<TABLE border=1 width=100%>
<TR><TH width=25%>Layer</TH><TD>testlayer èé</TD></TR>
</BR><TABLE border=1 width=100%>
<TR><TH>Feature</TH><TD>2</TD></TR>
<TR><TH>id</TH><TD>3</TD></TR>
<TR><TH>name</TH><TD>three</TD></TR>
<TR><TH>utf8nameè</TH><TD>three èé↓</TD></TR>
<TR><TH>geometry</TH><TD>Point (913204.9128 5606011.4565)</TD></TR>
</TABLE>
</BR>
</TABLE>
<BR></BR>
</BODY>