Skip to content
Permalink
Browse files

Update unit tests

  • Loading branch information
pblottiere committed Mar 29, 2019
1 parent 8d9d909 commit 0fe739d987695045c878bc7ec33ffa38dd7557e9
@@ -852,7 +852,7 @@ def test_wms_getmap_filter(self):
"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)
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>

0 comments on commit 0fe739d

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