Skip to content
Permalink
Browse files

Add tests

  • Loading branch information
pblottiere committed Jul 31, 2017
1 parent 3ebad9a commit e44a5ce44a6fc2df63e056c52a09e355e5e1df51
Showing with 34 additions and 0 deletions.
  1. +34 −0 tests/src/python/test_qgsserver_wms.py
@@ -245,6 +245,23 @@ def test_wms_getmap_basic(self):
r, h = self._result(self._execute_request(qs))
self._img_diff_error(r, h, "WMS_GetMap_Basic4")

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,db_point",
"STYLeS": "",
"FORMAt": "image/png",
"bBOX": "-16817707,-4710778,5696513,14587125",
"HeIGHT": "500",
"WIDTH": "500",
"CRs": "EPSG:3857"
}.items())])

r, h = self._result(self._execute_request(qs))
self._img_diff_error(r, h, "WMS_GetMap_Basic4")

def test_wms_getmap_invalid_parameters(self):
# height should be an int
qs = "?" + "&".join(["%s=%s" % i for i in list({
@@ -632,6 +649,23 @@ def test_wms_getmap_order(self):
self._img_diff_error(r, h, "WMS_GetMap_LayerOrder")

def test_wms_getmap_srs(self):
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,Hello",
"STYLES": "",
"FORMAT": "image/png",
"BBOX": "-151.7,-38.9,51.0,78.0",
"HEIGHT": "500",
"WIDTH": "500",
"SRS": "EPSG:4326"
}.items())])

r, h = self._result(self._execute_request(qs))
self._img_diff_error(r, h, "WMS_GetMap_SRS")

qs = "?" + "&".join(["%s=%s" % i for i in list({
"MAP": urllib.parse.quote(self.projectPath),
"SERVICE": "WMS",

0 comments on commit e44a5ce

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