Skip to content

Commit

Permalink
Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pblottiere committed Jul 31, 2017
1 parent 3ebad9a commit e44a5ce
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions tests/src/python/test_qgsserver_wms.py
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit e44a5ce

Please sign in to comment.