Skip to content

Commit

Permalink
Add unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
pblottiere committed Feb 26, 2019
1 parent 0f3b365 commit 14f201c
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions tests/src/python/test_qgsserver_wms_getmap.py
Expand Up @@ -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),
Expand Down

0 comments on commit 14f201c

Please sign in to comment.