mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-09 00:08:52 -04:00
Add unit test for getprint and external layers
This commit is contained in:
parent
216826bbf6
commit
cbc4270afb
@ -437,6 +437,30 @@ class TestQgsServerWMSGetPrint(QgsServerTestBase):
|
||||
self.assertTrue('atlasEnabled="1"' in str(r))
|
||||
self.assertTrue('<PrimaryKeyAttribute>' 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()
|
||||
|
BIN
tests/testdata/control_images/qgis_server/WMS_GetPrint_External/WMS_GetPrint_External.png
vendored
Normal file
BIN
tests/testdata/control_images/qgis_server/WMS_GetPrint_External/WMS_GetPrint_External.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.2 MiB |
Loading…
x
Reference in New Issue
Block a user