Skip to content

Commit 14f201c

Browse files
committedFeb 26, 2019
Add unit test
1 parent 0f3b365 commit 14f201c

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed
 

‎tests/src/python/test_qgsserver_wms_getmap.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,25 @@ def test_wms_getmap_dpi(self):
243243
self._img_diff_error(r, h, "WMS_GetMap_Basic5")
244244

245245
def test_wms_getmap_invalid_parameters(self):
246+
# invalid format
247+
qs = "?" + "&".join(["%s=%s" % i for i in list({
248+
"MAP": urllib.parse.quote(self.projectPath),
249+
"SERVICE": "WMS",
250+
"VERSION": "1.1.1",
251+
"REQUEST": "GetMap",
252+
"LAYERS": "Country",
253+
"STYLES": "",
254+
"FORMAT": "pdf",
255+
"BBOX": "-16817707,-4710778,5696513,14587125",
256+
"HEIGHT": "500",
257+
"WIDTH": "500",
258+
"CRS": "EPSG:3857"
259+
}.items())])
260+
261+
r, h = self._result(self._execute_request(qs))
262+
err = b"Output format \'pdf\' is not supported" in r
263+
self.assertTrue(err)
264+
246265
# height should be an int
247266
qs = "?" + "&".join(["%s=%s" % i for i in list({
248267
"MAP": urllib.parse.quote(self.projectPath),

0 commit comments

Comments
 (0)
Please sign in to comment.