@@ -409,6 +409,80 @@ def test_getfeature_post(self):
409409 for id , req in tests :
410410 self .wfs_getfeature_post_compare (id , req )
411411
412+ def test_wms_getmap_basic (self ):
413+ qs = "&" .join (["%s=%s" % i for i in list ({
414+ "MAP" : urllib .parse .quote (self .projectPath ),
415+ "SERVICE" : "WMS" ,
416+ "VERSION" : "1.1.1" ,
417+ "REQUEST" : "GetMap" ,
418+ "LAYERS" : "Country" ,
419+ "STYLES" : "" ,
420+ "FORMAT" : "image/png" ,
421+ "BBOX" : "-16817707,-4710778,5696513,14587125" ,
422+ "HEIGHT" : "500" ,
423+ "WIDTH" : "500" ,
424+ "CRS" : "EPSG:3857"
425+ }.items ())])
426+
427+ r , h = self ._result (self .server .handleRequest (qs ))
428+ self ._img_diff_error (r , h , "WMS_GetMap_Basic" )
429+
430+ def test_wms_getmap_transparent (self ):
431+ qs = "&" .join (["%s=%s" % i for i in list ({
432+ "MAP" : urllib .parse .quote (self .projectPath ),
433+ "SERVICE" : "WMS" ,
434+ "VERSION" : "1.1.1" ,
435+ "REQUEST" : "GetMap" ,
436+ "LAYERS" : "Country" ,
437+ "STYLES" : "" ,
438+ "FORMAT" : "image/png" ,
439+ "BBOX" : "-16817707,-4710778,5696513,14587125" ,
440+ "HEIGHT" : "500" ,
441+ "WIDTH" : "500" ,
442+ "CRS" : "EPSG:3857" ,
443+ "TRANSPARENT" : "TRUE"
444+ }.items ())])
445+
446+ r , h = self ._result (self .server .handleRequest (qs ))
447+ self ._img_diff_error (r , h , "WMS_GetMap_Transparent" )
448+
449+ def test_wms_getmap_background (self ):
450+ qs = "&" .join (["%s=%s" % i for i in list ({
451+ "MAP" : urllib .parse .quote (self .projectPath ),
452+ "SERVICE" : "WMS" ,
453+ "VERSION" : "1.1.1" ,
454+ "REQUEST" : "GetMap" ,
455+ "LAYERS" : "Country" ,
456+ "STYLES" : "" ,
457+ "FORMAT" : "image/png" ,
458+ "BBOX" : "-16817707,-4710778,5696513,14587125" ,
459+ "HEIGHT" : "500" ,
460+ "WIDTH" : "500" ,
461+ "CRS" : "EPSG:3857" ,
462+ "BGCOLOR" : "green"
463+ }.items ())])
464+
465+ r , h = self ._result (self .server .handleRequest (qs ))
466+ self ._img_diff_error (r , h , "WMS_GetMap_Background" )
467+
468+ qs = "&" .join (["%s=%s" % i for i in list ({
469+ "MAP" : urllib .parse .quote (self .projectPath ),
470+ "SERVICE" : "WMS" ,
471+ "VERSION" : "1.1.1" ,
472+ "REQUEST" : "GetMap" ,
473+ "LAYERS" : "Country" ,
474+ "STYLES" : "" ,
475+ "FORMAT" : "image/png" ,
476+ "BBOX" : "-16817707,-4710778,5696513,14587125" ,
477+ "HEIGHT" : "500" ,
478+ "WIDTH" : "500" ,
479+ "CRS" : "EPSG:3857" ,
480+ "BGCOLOR" : "0x008000"
481+ }.items ())])
482+
483+ r , h = self ._result (self .server .handleRequest (qs ))
484+ self ._img_diff_error (r , h , "WMS_GetMap_Background_Hex" )
485+
412486 def test_wms_getmap_order (self ):
413487 qs = "&" .join (["%s=%s" % i for i in list ({
414488 "MAP" : urllib .parse .quote (self .projectPath ),
@@ -699,6 +773,59 @@ def test_wms_GetLegendGraphic_Basic(self):
699773 r , h = self ._result (self .server .handleRequest (qs ))
700774 self ._img_diff_error (r , h , "WMS_GetLegendGraphic_Basic" )
701775
776+ def test_wms_GetLegendGraphic_Transparent (self ):
777+ qs = "&" .join (["%s=%s" % i for i in list ({
778+ "MAP" : urllib .parse .quote (self .projectPath ),
779+ "SERVICE" : "WMS" ,
780+ "VERSION" : "1.1.1" ,
781+ "REQUEST" : "GetLegendGraphic" ,
782+ "LAYER" : "Country,Hello" ,
783+ "LAYERTITLE" : "FALSE" ,
784+ "FORMAT" : "image/png" ,
785+ "HEIGHT" : "500" ,
786+ "WIDTH" : "500" ,
787+ "CRS" : "EPSG:3857" ,
788+ "TRANSPARENT" : "TRUE"
789+ }.items ())])
790+
791+ r , h = self ._result (self .server .handleRequest (qs ))
792+ self ._img_diff_error (r , h , "WMS_GetLegendGraphic_Transparent" )
793+
794+ def test_wms_GetLegendGraphic_Background (self ):
795+ qs = "&" .join (["%s=%s" % i for i in list ({
796+ "MAP" : urllib .parse .quote (self .projectPath ),
797+ "SERVICE" : "WMS" ,
798+ "VERSION" : "1.1.1" ,
799+ "REQUEST" : "GetLegendGraphic" ,
800+ "LAYER" : "Country,Hello" ,
801+ "LAYERTITLE" : "FALSE" ,
802+ "FORMAT" : "image/png" ,
803+ "HEIGHT" : "500" ,
804+ "WIDTH" : "500" ,
805+ "CRS" : "EPSG:3857" ,
806+ "BGCOLOR" : "green"
807+ }.items ())])
808+
809+ r , h = self ._result (self .server .handleRequest (qs ))
810+ self ._img_diff_error (r , h , "WMS_GetLegendGraphic_Background" )
811+
812+ qs = "&" .join (["%s=%s" % i for i in list ({
813+ "MAP" : urllib .parse .quote (self .projectPath ),
814+ "SERVICE" : "WMS" ,
815+ "VERSION" : "1.1.1" ,
816+ "REQUEST" : "GetLegendGraphic" ,
817+ "LAYER" : "Country,Hello" ,
818+ "LAYERTITLE" : "FALSE" ,
819+ "FORMAT" : "image/png" ,
820+ "HEIGHT" : "500" ,
821+ "WIDTH" : "500" ,
822+ "CRS" : "EPSG:3857" ,
823+ "BGCOLOR" : "0x008000"
824+ }.items ())])
825+
826+ r , h = self ._result (self .server .handleRequest (qs ))
827+ self ._img_diff_error (r , h , "WMS_GetLegendGraphic_Background_Hex" )
828+
702829 def test_wms_GetLegendGraphic_BoxSpace (self ):
703830 qs = "&" .join (["%s=%s" % i for i in list ({
704831 "MAP" : urllib .parse .quote (self .projectPath ),
0 commit comments