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