@@ -260,37 +260,40 @@ def test_wms_getLegendGraphics_rulelabel(self):
260
260
r , h = self ._result (self ._execute_request (qs ))
261
261
self ._img_diff_error (r , h , "WMS_GetLegendGraphic_rulelabel_true" , 250 , QSize (15 , 15 ))
262
262
263
- # LAYERTITLE false and no set of RULELABEL means it is false for single symbol
263
+ # no set of RULELABEL means it is true
264
264
parms = {
265
265
'MAP' : self .testdata_path + "test_project.qgs" ,
266
266
'SERVICE' : 'WMS' ,
267
267
'VERSION' : '1.3.0' ,
268
268
'REQUEST' : 'GetLegendGraphic' ,
269
269
'FORMAT' : 'image/png' ,
270
270
'LAYER' : u'testlayer%20èé' ,
271
+ 'LAYERFONTBOLD' : 'TRUE' ,
272
+ 'LAYERFONTSIZE' : '30' ,
273
+ 'ITEMFONTBOLD' : 'TRUE' ,
274
+ 'ITEMFONTSIZE' : '20' ,
275
+ 'LAYERFONTFAMILY' : self .fontFamily ,
276
+ 'ITEMFONTFAMILY' : self .fontFamily ,
271
277
'LAYERTITLE' : 'FALSE'
272
278
}
273
279
qs = '?' + '&' .join ([u"%s=%s" % (k , v ) for k , v in parms .items ()])
274
280
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 ))
276
282
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
278
284
parms = {
279
- 'MAP' : self .testdata_path + "test_project_legend_rule .qgs" ,
285
+ 'MAP' : self .testdata_path + "test_project .qgs" ,
280
286
'SERVICE' : 'WMS' ,
281
287
'VERSION' : '1.3.0' ,
282
288
'REQUEST' : 'GetLegendGraphic' ,
283
289
'FORMAT' : 'image/png' ,
284
290
'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'
290
293
}
291
294
qs = '?' + '&' .join ([u"%s=%s" % (k , v ) for k , v in parms .items ()])
292
295
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 ))
294
297
295
298
def test_wms_getLegendGraphics_rule (self ):
296
299
"""Test that does not return an exception but an image"""
0 commit comments