diff --git a/tests/src/python/test_qgsserver_wms_getprint.py b/tests/src/python/test_qgsserver_wms_getprint.py index fcae9b549de..9c117ee4609 100644 --- a/tests/src/python/test_qgsserver_wms_getprint.py +++ b/tests/src/python/test_qgsserver_wms_getprint.py @@ -437,6 +437,30 @@ class TestQgsServerWMSGetPrint(QgsServerTestBase): self.assertTrue('atlasEnabled="1"' in str(r)) self.assertTrue('' in str(r)) + @unittest.skipIf(os.environ.get('TRAVIS', '') == 'true', 'Can\'t rely on external resources for continuous integration') + def test_wms_getprint_external(self): + qs = "?" + "&".join(["%s=%s" % i for i in list({ + "MAP": urllib.parse.quote(self.projectPath), + "SERVICE": "WMS", + "VERSION": "1.1.1", + "REQUEST": "GetPrint", + "TEMPLATE": "layoutA4", + "map0:EXTENT": "-90,-180,90,180", + "map0:LAYERS": "EXTERNAL_WMS:landsat", + "landsat:layers": "GEBCO_LATEST", + "landsat:dpiMode": "7", + "landsat:url": "https://www.gebco.net/data_and_products/gebco_web_services/web_map_service/mapserv", + "landsat:crs": "EPSG:4326", + "landsat:styles": "default", + "landsat:format": "image/jpeg", + "landsat:bbox": "-90,-180,90,180", + "landsat:version": "1.3.0", + "CRS": "EPSG:4326" + }.items())]) + + r, h = self._result(self._execute_request(qs)) + self._img_diff_error(r, h, "WMS_GetPrint_External") + if __name__ == '__main__': unittest.main() diff --git a/tests/testdata/control_images/qgis_server/WMS_GetPrint_External/WMS_GetPrint_External.png b/tests/testdata/control_images/qgis_server/WMS_GetPrint_External/WMS_GetPrint_External.png new file mode 100644 index 00000000000..f833de7cd77 Binary files /dev/null and b/tests/testdata/control_images/qgis_server/WMS_GetPrint_External/WMS_GetPrint_External.png differ