Skip to content

Commit 34c1d7a

Browse files
committed
Add unit test for empty OGC filter
1 parent 2aeb5cf commit 34c1d7a

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

tests/src/python/test_qgsserver_wms_getmap.py

+20
Original file line numberDiff line numberDiff line change
@@ -821,6 +821,26 @@ def test_wms_getmap_filter_ogc_with_empty(self):
821821
r, h = self._result(self._execute_request(qs))
822822
self._img_diff_error(r, h, "WMS_GetMap_Filter_OGC")
823823

824+
def test_wms_getmap_filter_ogc_empty(self):
825+
filter = "(<ogc:Filter xmlns=\"http://www.opengis.net/ogc\"></ogc:Filter>)"
826+
qs = "?" + "&".join(["%s=%s" % i for i in list({
827+
"MAP": urllib.parse.quote(self.projectPath),
828+
"SERVICE": "WMS",
829+
"VERSION": "1.1.1",
830+
"REQUEST": "GetMap",
831+
"LAYERS": "Country,Hello",
832+
"STYLES": "",
833+
"FORMAT": "image/png",
834+
"BBOX": "-16817707,-4710778,5696513,14587125",
835+
"HEIGHT": "500",
836+
"WIDTH": "500",
837+
"CRS": "EPSG:3857",
838+
"FILTER": filter
839+
}.items())])
840+
841+
r, h = self._result(self._execute_request(qs))
842+
self._img_diff_error(r, h, "WMS_GetMap_Filter_OGC2")
843+
824844
def test_wms_getmap_selection(self):
825845
qs = "?" + "&".join(["%s=%s" % i for i in list({
826846
"MAP": urllib.parse.quote(self.projectPath),
Loading

0 commit comments

Comments
 (0)