@@ -1457,6 +1457,32 @@ def test_wms_getmap_datasource_error(self):
1457
1457
1458
1458
self .assertTrue ('ServerException' in str (r ))
1459
1459
1460
+ @unittest .skipIf (os .environ .get ('TRAVIS' , '' ) == 'true' , 'Can\' t rely on external resources for continuous integration' )
1461
+ def test_wms_getmap_external (self ):
1462
+ # 1 bits
1463
+ qs = "?" + "&" .join (["%s=%s" % i for i in list ({
1464
+ "MAP" : urllib .parse .quote (self .projectPath ),
1465
+ "SERVICE" : "WMS" ,
1466
+ "REQUEST" : "GetMap" ,
1467
+ "LAYERS" : "EXTERNAL_WMS:landsat" ,
1468
+ "landsat:layers" : "GEBCO_LATEST" ,
1469
+ "landsat:dpiMode" : "7" ,
1470
+ "landsat:url" : "https://www.gebco.net/data_and_products/gebco_web_services/web_map_service/mapserv" ,
1471
+ "landsat:crs" : "EPSG:4326" ,
1472
+ "landsat:styles" : "default" ,
1473
+ "landsat:format" : "image/jpeg" ,
1474
+ "landsat:bbox" : "-90,-180,90,180" ,
1475
+ "landsat:version" : "1.3.0" ,
1476
+ "STYLES" : "" ,
1477
+ "BBOX" : "-90,-180,90,180" ,
1478
+ "HEIGHT" : "500" ,
1479
+ "WIDTH" : "500" ,
1480
+ "CRS" : "EPSG:4326"
1481
+ }.items ())])
1482
+
1483
+ r , h = self ._result (self ._execute_request (qs ))
1484
+ self ._img_diff_error (r , h , "WMS_GetMap_External" , 20000 )
1485
+
1460
1486
1461
1487
if __name__ == '__main__' :
1462
1488
unittest .main ()
0 commit comments