Skip to content
Permalink
Browse files

Change order of headers in server tests

  • Loading branch information
mhugent committed Jul 7, 2015
1 parent 153deba commit f0835ec3e586cb0bb10db0ad6256daa4e9a01c96
@@ -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())
@@ -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">
@@ -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">

0 comments on commit f0835ec

Please sign in to comment.
You can’t perform that action at this time.