Skip to content

Commit

Permalink
Update tests for WMS grouped layers order
Browse files Browse the repository at this point in the history
  • Loading branch information
elpaso committed Feb 2, 2018
1 parent d7ef689 commit 50d378f
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion tests/src/python/test_qgsserver_wms_getmap.py
Expand Up @@ -890,12 +890,15 @@ def test_wms_getmap_sld(self):
self._img_diff_error(r, h, "WMS_GetMap_SLDRestored")

def test_wms_getmap_group(self):
"""A WMS shall render the requested layers by drawing the leftmost in the list
bottommost, the next one over that, and so on."""

qs = "?" + "&".join(["%s=%s" % i for i in list({
"MAP": urllib.parse.quote(self.projectGroupsPath),
"SERVICE": "WMS",
"VERSION": "1.1.1",
"REQUEST": "GetMap",
"LAYERS": "Country,Country_Labels,Country_Diagrams",
"LAYERS": "Country_Diagrams,Country_Labels,Country",
"STYLES": "",
"FORMAT": "image/png",
"BBOX": "-16817707,-4710778,5696513,14587125",
Expand All @@ -921,6 +924,16 @@ def test_wms_getmap_group(self):
}.items())])

r_group, _ = self._result(self._execute_request(qs))

""" Debug check:
f = open('grouped.png', 'wb+')
f.write(r_group)
f.close()
f = open('individual.png', 'wb+')
f.write(r_individual)
f.close()
#"""

self.assertEqual(r_individual, r_group, 'Individual layers query and group layers query results should be identical')

qs = "?" + "&".join(["%s=%s" % i for i in list({
Expand Down

0 comments on commit 50d378f

Please sign in to comment.