@@ -821,8 +821,9 @@ def test_wms_getmap_filter_ogc_with_empty(self):
821
821
r , h = self ._result (self ._execute_request (qs ))
822
822
self ._img_diff_error (r , h , "WMS_GetMap_Filter_OGC" )
823
823
824
- def test_wms_getmap_filter_ogc_empty (self ):
825
- filter = "(<ogc:Filter xmlns=\" http://www.opengis.net/ogc\" ></ogc:Filter>)"
824
+ # empty filter
825
+ filter = ("(<ogc:Filter xmlns=\" http://www.opengis.net/ogc\" >"
826
+ "</ogc:Filter>)" )
826
827
qs = "?" + "&" .join (["%s=%s" % i for i in list ({
827
828
"MAP" : urllib .parse .quote (self .projectPath ),
828
829
"SERVICE" : "WMS" ,
@@ -841,6 +842,30 @@ def test_wms_getmap_filter_ogc_empty(self):
841
842
r , h = self ._result (self ._execute_request (qs ))
842
843
self ._img_diff_error (r , h , "WMS_GetMap_Filter_OGC2" )
843
844
845
+ # filter on the second layer
846
+ filter_hello = ("(<Filter></Filter>)" )
847
+ filter_country = ("(<Filter><PropertyIsEqualTo><PropertyName>name"
848
+ "</PropertyName><Literal>eurasia</Literal>"
849
+ "</PropertyIsEqualTo></Filter>)" )
850
+ filter = "{}{}" .format (filter_hello , filter_country )
851
+ qs = "?" + "&" .join (["%s=%s" % i for i in list ({
852
+ "MAP" : urllib .parse .quote (self .projectPath ),
853
+ "SERVICE" : "WMS" ,
854
+ "VERSION" : "1.1.1" ,
855
+ "REQUEST" : "GetMap" ,
856
+ "LAYERS" : "Hello,Country" ,
857
+ "STYLES" : "" ,
858
+ "FORMAT" : "image/png" ,
859
+ "BBOX" : "-16817707,-4710778,5696513,14587125" ,
860
+ "HEIGHT" : "500" ,
861
+ "WIDTH" : "500" ,
862
+ "CRS" : "EPSG:3857" ,
863
+ "FILTER" : filter
864
+ }.items ())])
865
+
866
+ r , h = self ._result (self ._execute_request (qs ))
867
+ self ._img_diff_error (r , h , "WMS_GetMap_Filter_OGC3" )
868
+
844
869
def test_wms_getmap_selection (self ):
845
870
qs = "?" + "&" .join (["%s=%s" % i for i in list ({
846
871
"MAP" : urllib .parse .quote (self .projectPath ),
0 commit comments