Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[Server] Add GetContext test
  • Loading branch information
rldhont committed May 26, 2017
1 parent 6feca53 commit 83b3368
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
2 changes: 1 addition & 1 deletion tests/src/python/test_qgsserver_wms.py
Expand Up @@ -65,7 +65,7 @@ def wms_request_compare(self, request, extra=None, reference_file=None):

def test_project_wms(self):
"""Test some WMS request"""
for request in ('GetCapabilities', 'GetProjectSettings'):
for request in ('GetCapabilities', 'GetProjectSettings', 'GetContext'):
self.wms_request_compare(request)

# Test getfeatureinfo response
Expand Down
31 changes: 31 additions & 0 deletions tests/testdata/qgis_server/getcontext.txt
@@ -0,0 +1,31 @@
*****
Content-Type: text/xml; charset=utf-8

<?xml version="1.0" encoding="utf-8"?>
<OWSContext xmlns:ogc="http://www.opengis.net/ogc" version="0.3.1" xmlns:context="http://www.opengis.net/context" xmlns="http://www.opengis.net/ows-context" xmlns:xal="urn:oasis:names:tc:ciq:xsdschema:xAL:2.0" xmlns:kml="http://www.opengis.net/kml/2.2" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ows-context="http://www.opengis.net/ows-context" xmlns:sld="http://www.opengis.net/sld" xmlns:gml="http://www.opengis.net/gml" id="ows-context-test_project" xmlns:ows="http://www.opengis.net/ows" xmlns:ns9="http://www.w3.org/2005/Atom" xmlns:ins="http://www.inspire.org">
<General>
<Window width="800" height="600"/>
<ows:Title>QGIS TestProject</ows:Title>
<ows:Abstract>Some UTF8 text èòù</ows:Abstract>
<ows:BoundingBox crs="EPSG:4326">
<ows:LowerCorner>44.9012 8.20315</ows:LowerCorner>
<ows:UpperCorner>44.9016 8.20416</ows:UpperCorner>
</ows:BoundingBox>
</General>
<ResourceList>
<Layer opacity="1" queryable="true" hidden="false" id="testlayer_èé" name="testlayer èé">
<ows:Title>A test vector layer</ows:Title>
<ows:OutputFormat>image/png</ows:OutputFormat>
<Server version="1.3.0" default="true" service="urn:ogc:serviceType:WMS">
<OnlineResource xlink:href="https://www.qgis.org/?*****&amp;"/>
</Server>
<ows:Abstract>A test vector layer with unicode òà</ows:Abstract>
<StyleList>
<Style current="true">
<Name>default</Name>
<Title>default</Title>
</Style>
</StyleList>
</Layer>
</ResourceList>
</OWSContext>

0 comments on commit 83b3368

Please sign in to comment.