Skip to content

Commit d63f4c7

Browse files
committed
[server][test] GetPrint test with two maps template
This is to test that map0 and map1 actually refer to the correct maps
1 parent e137ea8 commit d63f4c7

File tree

3 files changed

+1733
-2766
lines changed

3 files changed

+1733
-2766
lines changed

tests/src/python/test_qgsserver_wms_getprint.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,26 @@ def test_wms_getprint_label(self):
391391
r, h = self._result(self._execute_request(qs))
392392
self._img_diff_error(r, h, "WMS_GetPrint_LabelRemoved")
393393

394+
def test_wms_getprint_two_maps(self):
395+
"""Test map0 and map1 apply to the correct maps"""
396+
qs = "?" + "&".join(["%s=%s" % i for i in list({
397+
"MAP": urllib.parse.quote(self.projectPath),
398+
"SERVICE": "WMS",
399+
"VERSION": "1.1.1",
400+
"REQUEST": "GetPrint",
401+
"TEMPLATE": "layoutA4twoMaps",
402+
"FORMAT": "png",
403+
"map0:EXTENT": "11863620.20301065221428871,-5848927.97872077487409115,19375243.89574331790208817,138857.97204941",
404+
"map0:LAYERS": "Country",
405+
"map1:EXTENT": "-33626185.498,-13032965.185,33978427.737,16020257.031",
406+
"map1:LAYERS": "Country,Hello",
407+
"CRS": "EPSG:3857",
408+
"IDTEXTBOX": "",
409+
}.items())])
410+
411+
r, h = self._result(self._execute_request(qs))
412+
self._img_diff_error(r, h, "WMS_GetPrint_TwoMaps")
413+
394414

395415
if __name__ == '__main__':
396416
unittest.main()
Loading

0 commit comments

Comments
 (0)