Skip to content
Permalink
Browse files

Add unit test

  • Loading branch information
pblottiere committed Jan 10, 2019
1 parent 0f3b365 commit 14f201caff10c340966cc53237704c1ff0cee8fe
Showing with 19 additions and 0 deletions.
  1. +19 −0 tests/src/python/test_qgsserver_wms_getmap.py
@@ -243,6 +243,25 @@ def test_wms_getmap_dpi(self):
self._img_diff_error(r, h, "WMS_GetMap_Basic5")

def test_wms_getmap_invalid_parameters(self):
# invalid format
qs = "?" + "&".join(["%s=%s" % i for i in list({
"MAP": urllib.parse.quote(self.projectPath),
"SERVICE": "WMS",
"VERSION": "1.1.1",
"REQUEST": "GetMap",
"LAYERS": "Country",
"STYLES": "",
"FORMAT": "pdf",
"BBOX": "-16817707,-4710778,5696513,14587125",
"HEIGHT": "500",
"WIDTH": "500",
"CRS": "EPSG:3857"
}.items())])

r, h = self._result(self._execute_request(qs))
err = b"Output format \'pdf\' is not supported" in r
self.assertTrue(err)

# height should be an int
qs = "?" + "&".join(["%s=%s" % i for i in list({
"MAP": urllib.parse.quote(self.projectPath),

0 comments on commit 14f201c

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