Skip to content

Commit 216826b

Browse files
committed
Add test for getmap and external layers
1 parent d6c7c93 commit 216826b

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

tests/src/python/test_qgsserver_wms_getmap.py

+26
Original file line numberDiff line numberDiff line change
@@ -1457,6 +1457,32 @@ def test_wms_getmap_datasource_error(self):
14571457

14581458
self.assertTrue('ServerException' in str(r))
14591459

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+
14601486

14611487
if __name__ == '__main__':
14621488
unittest.main()
Loading

0 commit comments

Comments
 (0)