Skip to content

Commit ef8e58b

Browse files
committedJun 24, 2017
Unit test for feature info geometry filter
1 parent 77b9b1a commit ef8e58b

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed
 

‎tests/src/python/test_qgsserver_wms.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,15 @@ def test_project_wms(self):
125125
'query_layers=testlayer%20%C3%A8%C3%A9&' +
126126
'FEATURE_COUNT=10&FILTER=testlayer%20%C3%A8%C3%A9' + urllib.parse.quote(':"NAME" = \'two\' OR "utf8nameè" = \'three èé↓\''),
127127
'wms_getfeatureinfo_filter_or_utf8')
128+
129+
# Test feature info request with filter geometry
130+
self.wms_request_compare('GetFeatureInfo',
131+
'&layers=testlayer%20%C3%A8%C3%A9&' +
132+
'INFO_FORMAT=text%2Fxml&' +
133+
'width=600&height=400&srs=EPSG%3A3857&' +
134+
'query_layers=testlayer%20%C3%A8%C3%A9&' +
135+
'FEATURE_COUNT=10&FILTER_GEOM=POLYGON((8.2035381 44.901459,8.2035562 44.901459,8.2035562 44.901418,8.2035381 44.901418,8.2035381 44.901459))',
136+
'wms_getfeatureinfo_geometry_filter')
128137

129138
# Test DescribeLayer
130139
self.wms_request_compare('DescribeLayer',
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Content-Length: 261
2+
Content-Type: text/xml; charset=utf-8
3+
4+
<GetFeatureInfoResponse>
5+
<Layer name="testlayer èé">
6+
<Feature id="1">
7+
<Attribute name="id" value="2"/>
8+
<Attribute name="name" value="two"/>
9+
<Attribute name="utf8nameè" value="two àò"/>
10+
<BoundingBox CRS="EPSG:3857" minx="913214.6741" maxx="913214.6741" miny="5606017.8743" maxy="5606017.8743"/>
11+
<Attribute name="geometry" value="Point (913214.6741 5606017.8743)" type="derived"/>
12+
</Feature>
13+
</Layer>
14+
</GetFeatureInfoResponse>

0 commit comments

Comments
 (0)
Please sign in to comment.