Skip to content

Commit

Permalink
Change order of headers in server tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mhugent committed Jul 7, 2015
1 parent 153deba commit f0835ec
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions tests/src/python/test_qgsserver.py
Expand Up @@ -56,11 +56,11 @@ def test_api(self):
we are going to test if headers and body are returned correctly"""
# Test as a whole
response = str(self.server.handleRequest())
expected = 'Content-Type: text/xml; charset=utf-8\nContent-Length: 206\n\n<ServiceExceptionReport version="1.3.0" xmlns="http://www.opengis.net/ogc">\n <ServiceException code="Service configuration error">Service unknown or unsupported</ServiceException>\n</ServiceExceptionReport>\n'
expected = 'Content-Length: 206\nContent-Type: text/xml; charset=utf-8\n\n<ServiceExceptionReport version="1.3.0" xmlns="http://www.opengis.net/ogc">\n <ServiceException code="Service configuration error">Service unknown or unsupported</ServiceException>\n</ServiceExceptionReport>\n'
self.assertEqual(response, expected)
# Test header
response = str(self.server.handleRequestGetHeaders())
expected = 'Content-Type: text/xml; charset=utf-8\nContent-Length: 206\n\n'
expected = 'Content-Length: 206\nContent-Type: text/xml; charset=utf-8\n\n'
self.assertEqual(response, expected)
# Test body
response = str(self.server.handleRequestGetBody())
Expand Down
2 changes: 1 addition & 1 deletion tests/testdata/qgis_server/getcapabilities.txt
@@ -1,5 +1,5 @@
Content-Type: text/xml; charset=utf-8
Content-Length: 5250
Content-Type: text/xml; charset=utf-8

<?xml version="1.0" encoding="utf-8"?>
<WMS_Capabilities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.3" xmlns="http://www.opengis.net/wms" xsi:schemaLocation="http://www.opengis.net/wms http://schemas.opengis.net/wms/1.3.0/capabilities_1_3_0.xsd http://www.opengis.net/sld http://schemas.opengis.net/sld/1.1.0/sld_capabilities.xsd http://www.qgis.org/wms http:?MAP=/home/ale/dev/QGIS/tests/testdata/qgis_server/testproject.qgs&amp;SERVICE=WMS&amp;REQUEST=GetSchemaExtension" xmlns:sld="http://www.opengis.net/sld" xmlns:qgs="http://www.qgis.org/wms">
Expand Down
2 changes: 1 addition & 1 deletion tests/testdata/qgis_server/getprojectsettings.txt
@@ -1,5 +1,5 @@
Content-Type: text/xml; charset=utf-8
Content-Length: 6268
Content-Type: text/xml; charset=utf-8

<?xml version="1.0" encoding="utf-8"?>
<WMS_Capabilities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.3.0" xmlns="http://www.opengis.net/wms" xsi:schemaLocation="http://www.opengis.net/wms http://schemas.opengis.net/wms/1.3.0/capabilities_1_3_0.xsd http://www.opengis.net/sld http://schemas.opengis.net/sld/1.1.0/sld_capabilities.xsd http://www.qgis.org/wms http:?MAP=/home/ale/dev/QGIS/tests/testdata/qgis_server/testproject.qgs&amp;SERVICE=WMS&amp;REQUEST=GetSchemaExtension" xmlns:sld="http://www.opengis.net/sld" xmlns:qgs="http://www.qgis.org/wms">
Expand Down

0 comments on commit f0835ec

Please sign in to comment.