Skip to content
Permalink
Browse files

Add unit test

  • Loading branch information
pblottiere committed May 15, 2018
1 parent 7c87138 commit 96a0b4777c4062d9a5f37c15d250d89297877757
@@ -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
@@ -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),
Binary file not shown.

0 comments on commit 96a0b47

Please sign in to comment.
You can’t perform that action at this time.