Skip to content
Permalink
Browse files
[Tests][Server] WMS GetLegendGraphic JSON for layer with multiple sym…
…bols

Add a test for WMS GetLegendGraphic to JSOn format for a vector layer with multiple symbols
  • Loading branch information
rldhont authored and nyalldawson committed Nov 1, 2021
1 parent 51220eb commit a51e72072ec2b7850dcb384867af0bab5bd02af6
Showing with 29 additions and 0 deletions.
  1. +7 −0 tests/src/python/test_qgsserver_wms_getlegendgraphic.py
  2. +22 −0 tests/testdata/qgis_server/wms_getlegendgraphic_json_multiple_symbol.txt
@@ -1002,6 +1002,13 @@ def test_wms_GetLegendGraphic_JSON_multiple_layers(self):
"&FORMAT=application/json",
"wms_getlegendgraphic_json_multiple_layers")

def test_wms_GetLegendGraphic_JSON_multiple_symbol(self):
self.wms_request_compare("GetLegendGraphic",
"&LAYERS=cdb_lines"
"&FORMAT=application/json",
"wms_getlegendgraphic_json_multiple_symbol",
'test_project_wms_grouped_layers.qgs')


if __name__ == '__main__':
unittest.main()
@@ -0,0 +1,22 @@
*****
Content-Type: application/json

{
"nodes": [
{
"symbols": [
{
"icon": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAA9hAAAPYQGoP6dpAAAAKUlEQVQ4jWP0c/v/n4ESQIkBfm7//zNRZDsDA8OoAaMGjBoAAYyUZmcAMb0KZdjI3VIAAAAASUVORK5CYII=",
"title": "Ortsteil"
},
{
"icon": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAA9hAAAPYQGoP6dpAAAAKklEQVQ4jWOcOeX/fwZKACUGzJzy/z8TRbYzMDCMGjBqwKgBEMBIaXYGACyFDMn+2JVEAAAAAElFTkSuQmCC",
"title": "Stadtteil"
}
],
"title": "cdb_lines",
"type": "layer"
}
],
"title": ""
}

0 comments on commit a51e720

Please sign in to comment.