Skip to content
Permalink
Browse files

Add unit test for point tolerance

  • Loading branch information
pblottiere committed Oct 2, 2018
1 parent 2c5d1c5 commit 6fce7853ca1bd3c94e7a427dd7ed33e64108479a
@@ -322,6 +322,35 @@ def testGetFeatureInfoFilter(self):
'FEATURE_COUNT=10&FILTER=testlayer%20%C3%A8%C3%A9' + urllib.parse.quote(':"NAME" = \'two\''),
'wms_getfeatureinfo_filter_no_width')

def testGetFeatureInfoTolerance(self):
self.wms_request_compare('GetFeatureInfo',
'&layers=layer3&styles=&' +
'VERSION=1.3.0&' +
'info_format=text%2Fxml&' +
'width=400&height=200' +
'&bbox=913119.2,5605988.9,913316.0,5606047.4' +
'&CRS=EPSG:3857' +
'&FEATURE_COUNT=10' +
'&WITH_GEOMETRY=False' +
'&QUERY_LAYERS=layer3&I=193&J=100' +
'&FI_POINT_TOLERANCE=0',
'wms_getfeatureinfo_point_tolerance_0_text_xml',
'test_project_values.qgz')

self.wms_request_compare('GetFeatureInfo',
'&layers=layer3&styles=&' +
'VERSION=1.3.0&' +
'info_format=text%2Fxml&' +
'width=400&height=200' +
'&bbox=913119.2,5605988.9,913316.0,5606047.4' +
'&CRS=EPSG:3857' +
'&FEATURE_COUNT=10' +
'&WITH_GEOMETRY=False' +
'&QUERY_LAYERS=layer3&I=193&J=100' +
'&FI_POINT_TOLERANCE=20',
'wms_getfeatureinfo_point_tolerance_20_text_xml',
'test_project_values.qgz')


if __name__ == '__main__':
unittest.main()
@@ -0,0 +1,11 @@
*****
Content-Type: text/xml; charset=utf-8

<GetFeatureInfoResponse>
<Layer name="layer3">
<Feature id="2">
<Attribute value="2" name="id"/>
<Attribute value="" name="location"/>
</Feature>
</Layer>
</GetFeatureInfoResponse>
@@ -0,0 +1,15 @@
*****
Content-Type: text/xml; charset=utf-8

<GetFeatureInfoResponse>
<Layer name="layer3">
<Feature id="1">
<Attribute value="1" name="id"/>
<Attribute value="Id no. 1 value, Id no. 2 value, Id número 3 value" name="location"/>
</Feature>
<Feature id="2">
<Attribute value="2" name="id"/>
<Attribute value="" name="location"/>
</Feature>
</Layer>
</GetFeatureInfoResponse>

0 comments on commit 6fce785

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