Skip to content

Commit c79a40f

Browse files
committedMay 12, 2020
Revert test for rulelabel not set, add new rulelabel=auto test, clean data from previous commits
1 parent f957b9f commit c79a40f

File tree

7 files changed

+13
-10
lines changed

7 files changed

+13
-10
lines changed
 

‎tests/src/python/test_qgsserver_wms_getlegendgraphic.py

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -260,37 +260,40 @@ def test_wms_getLegendGraphics_rulelabel(self):
260260
r, h = self._result(self._execute_request(qs))
261261
self._img_diff_error(r, h, "WMS_GetLegendGraphic_rulelabel_true", 250, QSize(15, 15))
262262

263-
# LAYERTITLE false and no set of RULELABEL means it is false for single symbol
263+
# no set of RULELABEL means it is true
264264
parms = {
265265
'MAP': self.testdata_path + "test_project.qgs",
266266
'SERVICE': 'WMS',
267267
'VERSION': '1.3.0',
268268
'REQUEST': 'GetLegendGraphic',
269269
'FORMAT': 'image/png',
270270
'LAYER': u'testlayer%20èé',
271+
'LAYERFONTBOLD': 'TRUE',
272+
'LAYERFONTSIZE': '30',
273+
'ITEMFONTBOLD': 'TRUE',
274+
'ITEMFONTSIZE': '20',
275+
'LAYERFONTFAMILY': self.fontFamily,
276+
'ITEMFONTFAMILY': self.fontFamily,
271277
'LAYERTITLE': 'FALSE'
272278
}
273279
qs = '?' + '&'.join([u"%s=%s" % (k, v) for k, v in parms.items()])
274280
r, h = self._result(self._execute_request(qs))
275-
self._img_diff_error(r, h, "WMS_GetLegendGraphic_rulelabel_notset0", 250, QSize(15, 15))
281+
self._img_diff_error(r, h, "WMS_GetLegendGraphic_rulelabel_notset", 250, QSize(15, 15))
276282

277-
# LAYERTITLE false and no set of RULELABEL means it is true for legend other than single symbol
283+
# RULELABEL AUTO for single symbol means it is removed
278284
parms = {
279-
'MAP': self.testdata_path + "test_project_legend_rule.qgs",
285+
'MAP': self.testdata_path + "test_project.qgs",
280286
'SERVICE': 'WMS',
281287
'VERSION': '1.3.0',
282288
'REQUEST': 'GetLegendGraphic',
283289
'FORMAT': 'image/png',
284290
'LAYER': u'testlayer%20èé',
285-
'ITEMFONTBOLD': 'TRUE',
286-
'ITEMFONTSIZE': '20',
287-
'LAYERFONTFAMILY': self.fontFamily,
288-
'ITEMFONTFAMILY': self.fontFamily,
289-
'LAYERTITLE': 'FALSE'
291+
'LAYERTITLE': 'FALSE',
292+
'RULELABEL': 'AUTO'
290293
}
291294
qs = '?' + '&'.join([u"%s=%s" % (k, v) for k, v in parms.items()])
292295
r, h = self._result(self._execute_request(qs))
293-
self._img_diff_error(r, h, "WMS_GetLegendGraphic_rulelabel_notset1", 250, QSize(15, 15))
296+
self._img_diff_error(r, h, "WMS_GetLegendGraphic_rulelabel_auto", 250, QSize(15, 15))
294297

295298
def test_wms_getLegendGraphics_rule(self):
296299
"""Test that does not return an exception but an image"""

0 commit comments

Comments
 (0)
Please sign in to comment.