[Server] Add GetContext test

This commit is contained in:
rldhont 2017-05-25 15:37:02 +02:00
parent 6feca53278
commit 83b3368e38
2 changed files with 32 additions and 1 deletions

View File

@ -65,7 +65,7 @@ class TestQgsServerWMS(QgsServerTestBase):
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

View File

@ -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>