Skip to content

Commit

Permalink
Add unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
pblottiere committed May 17, 2018
1 parent 7c87138 commit 96a0b47
Show file tree
Hide file tree
Showing 3 changed files with 3,373 additions and 0 deletions.
22 changes: 22 additions & 0 deletions tests/src/python/test_qgsserver_wms_getmap.py
Expand Up @@ -32,6 +32,7 @@
import osgeo.gdal # NOQA

from test_qgsserver import QgsServerTestBase
from utilities import unitTestDataPath
from qgis.core import QgsProject

# Strip path and content length because path may vary
Expand Down Expand Up @@ -515,6 +516,27 @@ def test_wms_getmap_transparent(self):
r, h = self._result(self._execute_request(qs))
self._img_diff_error(r, h, "WMS_GetMap_Transparent")

def test_wms_getmap_labeling_settings(self):
d = unitTestDataPath('qgis_server_accesscontrol') + '/'
project = os.path.join(d, "project_labeling_settings.qgs")
qs = "?" + "&".join(["%s=%s" % i for i in list({
"MAP": urllib.parse.quote(project),
"SERVICE": "WMS",
"VERSION": "1.1.1",
"REQUEST": "GetMap",
"LAYERS": "Country_Labels",
"STYLES": "",
"FORMAT": "image/png",
"BBOX": "-16817707,-4710778,5696513,14587125",
"HEIGHT": "500",
"WIDTH": "500",
"CRS": "EPSG:3857",
"TRANSPARENT": "TRUE"
}.items())])

r, h = self._result(self._execute_request(qs))
self._img_diff_error(r, h, "WMS_GetMap_LabelingSettings")

def test_wms_getmap_background(self):
qs = "?" + "&".join(["%s=%s" % i for i in list({
"MAP": urllib.parse.quote(self.projectPath),
Expand Down
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 96a0b47

Please sign in to comment.