mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-28 00:17:30 -05:00
Update unit tests
This commit is contained in:
parent
8d9d90915a
commit
0fe739d987
@ -852,7 +852,7 @@ class TestQgsServerWMSGetMap(QgsServerTestBase):
|
|||||||
"FILTER": "Country,Country_Diagrams: \"name\" IN ( 'africa , 'eurasia' );Hello: \"color\" IN ( 'magenta' , 'cerese' )"
|
"FILTER": "Country,Country_Diagrams: \"name\" IN ( 'africa , 'eurasia' );Hello: \"color\" IN ( 'magenta' , 'cerese' )"
|
||||||
}.items())])
|
}.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,<,>=,>,>=,!=,\',\',(,),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,<,>=,>,>=,!=,\',\',(,),DMETAPHONE,SOUNDEX. Not allowed are semicolons in the filter expression.</ServiceException>\n</ServiceExceptionReport>\n')
|
||||||
r, h = self._result(self._execute_request(qs))
|
r, h = self._result(self._execute_request(qs))
|
||||||
|
|
||||||
self.assertEqual(self.strip_version_xmlns(r), expected)
|
self.assertEqual(self.strip_version_xmlns(r), expected)
|
||||||
|
@ -2,5 +2,5 @@
|
|||||||
Content-Type: text/xml; charset=utf-8
|
Content-Type: text/xml; charset=utf-8
|
||||||
|
|
||||||
<ServiceExceptionReport xmlns="http://www.opengis.net/ogc" version="1.3.0">
|
<ServiceExceptionReport xmlns="http://www.opengis.net/ogc" version="1.3.0">
|
||||||
<ServiceException code="LayerNotQueryable">Layer 'group_name' is not queryable</ServiceException>
|
<ServiceException code="LayerNotQueryable">The layer 'group_name' is not queryable.</ServiceException>
|
||||||
</ServiceExceptionReport>
|
</ServiceExceptionReport>
|
||||||
|
@ -2,5 +2,5 @@
|
|||||||
Content-Type: text/xml; charset=utf-8
|
Content-Type: text/xml; charset=utf-8
|
||||||
|
|
||||||
<ServiceExceptionReport xmlns="http://www.opengis.net/ogc" version="1.3.0">
|
<ServiceExceptionReport xmlns="http://www.opengis.net/ogc" version="1.3.0">
|
||||||
<ServiceException code="LayerNotQueryable">Layer 'groupwithoutshortname' is not queryable</ServiceException>
|
<ServiceException code="LayerNotQueryable">The layer 'groupwithoutshortname' is not queryable.</ServiceException>
|
||||||
</ServiceExceptionReport>
|
</ServiceExceptionReport>
|
||||||
|
@ -2,5 +2,5 @@
|
|||||||
Content-Type: text/xml; charset=utf-8
|
Content-Type: text/xml; charset=utf-8
|
||||||
|
|
||||||
<ServiceExceptionReport version="1.3.0" xmlns="http://www.opengis.net/ogc">
|
<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>
|
</ServiceExceptionReport>
|
||||||
|
@ -2,5 +2,5 @@
|
|||||||
Content-Type: text/xml; charset=utf-8
|
Content-Type: text/xml; charset=utf-8
|
||||||
|
|
||||||
<ServiceExceptionReport xmlns="http://www.opengis.net/ogc" version="1.3.0">
|
<ServiceExceptionReport xmlns="http://www.opengis.net/ogc" version="1.3.0">
|
||||||
<ServiceException code="LayerNotQueryable">Layer 'testlayer3' is not queryable</ServiceException>
|
<ServiceException code="LayerNotQueryable">The layer 'testlayer3' is not queryable.</ServiceException>
|
||||||
</ServiceExceptionReport>
|
</ServiceExceptionReport>
|
||||||
|
@ -2,5 +2,5 @@
|
|||||||
Content-Type: text/xml; charset=utf-8
|
Content-Type: text/xml; charset=utf-8
|
||||||
|
|
||||||
<ServiceExceptionReport xmlns="http://www.opengis.net/ogc" version="1.3.0">
|
<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>
|
</ServiceExceptionReport>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user