Skip to content

Commit

Permalink
Merge pull request #4027 from rldhont/server-selection-tests
Browse files Browse the repository at this point in the history
[Server] SELECTION tests
  • Loading branch information
rldhont committed Jan 19, 2017
2 parents 95ca471 + d1f233d commit 16eac9f
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion tests/src/python/test_qgsserver.py
Expand Up @@ -588,7 +588,7 @@ def test_wms_getmap_selection(self):
"HEIGHT": "500",
"WIDTH": "500",
"SRS": "EPSG:3857",
"SELECTION": "Country_Labels: 4"
"SELECTION": "Country: 4"
}.items())])

r, h = self._result(self.server.handleRequest(qs))
Expand Down Expand Up @@ -707,6 +707,25 @@ def test_wms_getprint_rotation(self):
r, h = self._result(self.server.handleRequest(qs))
self._img_diff_error(r, h, "WMS_GetPrint_Rotation")

def test_wms_getprint_selection(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",
"FORMAT": "png",
"map0:EXTENT": "-33626185.498,-13032965.185,33978427.737,16020257.031",
"map0:LAYERS": "Country,Hello",
"HEIGHT": "500",
"WIDTH": "500",
"CRS": "EPSG:3857",
"SELECTION": "Country: 4"
}.items())])

r, h = self._result(self.server.handleRequest(qs))
self._img_diff_error(r, h, "WMS_GetPrint_Selection")

def test_getLegendGraphics(self):
"""Test that does not return an exception but an image"""
parms = {
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 16eac9f

Please sign in to comment.