Update unit tests

This commit is contained in:
Blottiere Paul 2019-03-29 12:12:59 +01:00
parent 8d9d90915a
commit 0fe739d987
6 changed files with 9 additions and 9 deletions

View File

@ -852,7 +852,7 @@ class TestQgsServerWMSGetMap(QgsServerTestBase):
"FILTER": "Country,Country_Diagrams: \"name\" IN ( 'africa , 'eurasia' );Hello: \"color\" IN ( 'magenta' , 'cerese' )"
}.items())])
expected = self.strip_version_xmlns(b'<ServiceExceptionReport >\n <ServiceException code="Filter string rejected">The filter string "name" IN ( \'africa , \'eurasia\' ) has been rejected because of security reasons. Note: Text strings have to be enclosed in single or double quotes. A space between each word / special character is mandatory. Allowed Keywords and special characters are AND,OR,IN,&lt;,>=,>,>=,!=,\',\',(,),DMETAPHONE,SOUNDEX. Not allowed are semicolons in the filter expression.</ServiceException>\n</ServiceExceptionReport>\n')
expected = self.strip_version_xmlns(b'<ServiceExceptionReport >\n <ServiceException code="Security">The filter string "name" IN ( \'africa , \'eurasia\' ) has been rejected because of security reasons. Note: Text strings have to be enclosed in single or double quotes. A space between each word / special character is mandatory. Allowed Keywords and special characters are AND,OR,IN,&lt;,>=,>,>=,!=,\',\',(,),DMETAPHONE,SOUNDEX. Not allowed are semicolons in the filter expression.</ServiceException>\n</ServiceExceptionReport>\n')
r, h = self._result(self._execute_request(qs))
self.assertEqual(self.strip_version_xmlns(r), expected)

View File

@ -2,5 +2,5 @@
Content-Type: text/xml; charset=utf-8
<ServiceExceptionReport xmlns="http://www.opengis.net/ogc" version="1.3.0">
<ServiceException code="LayerNotQueryable">Layer 'group_name' is not queryable</ServiceException>
</ServiceExceptionReport>
<ServiceException code="LayerNotQueryable">The layer 'group_name' is not queryable.</ServiceException>
</ServiceExceptionReport>

View File

@ -2,5 +2,5 @@
Content-Type: text/xml; charset=utf-8
<ServiceExceptionReport xmlns="http://www.opengis.net/ogc" version="1.3.0">
<ServiceException code="LayerNotQueryable">Layer 'groupwithoutshortname' is not queryable</ServiceException>
</ServiceExceptionReport>
<ServiceException code="LayerNotQueryable">The layer 'groupwithoutshortname' is not queryable.</ServiceException>
</ServiceExceptionReport>

View File

@ -2,5 +2,5 @@
Content-Type: text/xml; charset=utf-8
<ServiceExceptionReport version="1.3.0" xmlns="http://www.opengis.net/ogc">
<ServiceException code="InvalidFormat">Invalid INFO_FORMAT parameter</ServiceException>
<ServiceException code="InvalidFormat">The format 'InvalidFormat' from INFO_FORMAT is not supported.</ServiceException>
</ServiceExceptionReport>

View File

@ -2,5 +2,5 @@
Content-Type: text/xml; charset=utf-8
<ServiceExceptionReport xmlns="http://www.opengis.net/ogc" version="1.3.0">
<ServiceException code="LayerNotQueryable">Layer 'testlayer3' is not queryable</ServiceException>
</ServiceExceptionReport>
<ServiceException code="LayerNotQueryable">The layer 'testlayer3' is not queryable.</ServiceException>
</ServiceExceptionReport>

View File

@ -2,5 +2,5 @@
Content-Type: text/xml; charset=utf-8
<ServiceExceptionReport xmlns="http://www.opengis.net/ogc" version="1.3.0">
<ServiceException code="LayerNotDefined">Layer 'InvalidLayer' not found</ServiceException>
<ServiceException code="LayerNotDefined">The layer 'InvalidLayer' does not exist.</ServiceException>
</ServiceExceptionReport>