Skip to content

Commit e44a5ce

Browse files
committedJul 31, 2017
Add tests
1 parent 3ebad9a commit e44a5ce

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed
 

‎tests/src/python/test_qgsserver_wms.py

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,23 @@ def test_wms_getmap_basic(self):
245245
r, h = self._result(self._execute_request(qs))
246246
self._img_diff_error(r, h, "WMS_GetMap_Basic4")
247247

248+
qs = "?" + "&".join(["%s=%s" % i for i in list({
249+
"MAP": urllib.parse.quote(self.projectPath),
250+
"sERVICE": "WMS",
251+
"VeRSION": "1.1.1",
252+
"REqUEST": "GetMap",
253+
"LAYeRS": "Country,db_point",
254+
"STYLeS": "",
255+
"FORMAt": "image/png",
256+
"bBOX": "-16817707,-4710778,5696513,14587125",
257+
"HeIGHT": "500",
258+
"WIDTH": "500",
259+
"CRs": "EPSG:3857"
260+
}.items())])
261+
262+
r, h = self._result(self._execute_request(qs))
263+
self._img_diff_error(r, h, "WMS_GetMap_Basic4")
264+
248265
def test_wms_getmap_invalid_parameters(self):
249266
# height should be an int
250267
qs = "?" + "&".join(["%s=%s" % i for i in list({
@@ -632,6 +649,23 @@ def test_wms_getmap_order(self):
632649
self._img_diff_error(r, h, "WMS_GetMap_LayerOrder")
633650

634651
def test_wms_getmap_srs(self):
652+
qs = "?" + "&".join(["%s=%s" % i for i in list({
653+
"MAP": urllib.parse.quote(self.projectPath),
654+
"SERVICE": "WMS",
655+
"VERSION": "1.1.1",
656+
"REQUEST": "GetMap",
657+
"LAYERS": "Country,Hello",
658+
"STYLES": "",
659+
"FORMAT": "image/png",
660+
"BBOX": "-151.7,-38.9,51.0,78.0",
661+
"HEIGHT": "500",
662+
"WIDTH": "500",
663+
"SRS": "EPSG:4326"
664+
}.items())])
665+
666+
r, h = self._result(self._execute_request(qs))
667+
self._img_diff_error(r, h, "WMS_GetMap_SRS")
668+
635669
qs = "?" + "&".join(["%s=%s" % i for i in list({
636670
"MAP": urllib.parse.quote(self.projectPath),
637671
"SERVICE": "WMS",

0 commit comments

Comments
 (0)
Please sign in to comment.