Skip to content

Commit 0fe739d

Browse files
committedMar 29, 2019
Update unit tests
1 parent 8d9d909 commit 0fe739d

6 files changed

+9
-9
lines changed
 

‎tests/src/python/test_qgsserver_wms_getmap.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -852,7 +852,7 @@ def test_wms_getmap_filter(self):
852852
"FILTER": "Country,Country_Diagrams: \"name\" IN ( 'africa , 'eurasia' );Hello: \"color\" IN ( 'magenta' , 'cerese' )"
853853
}.items())])
854854

855-
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')
855+
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')
856856
r, h = self._result(self._execute_request(qs))
857857

858858
self.assertEqual(self.strip_version_xmlns(r), expected)

‎tests/testdata/qgis_server/wms_getfeatureinfo-group_name-notqueryable.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
Content-Type: text/xml; charset=utf-8
33

44
<ServiceExceptionReport xmlns="http://www.opengis.net/ogc" version="1.3.0">
5-
<ServiceException code="LayerNotQueryable">Layer 'group_name' is not queryable</ServiceException>
6-
</ServiceExceptionReport>
5+
<ServiceException code="LayerNotQueryable">The layer 'group_name' is not queryable.</ServiceException>
6+
</ServiceExceptionReport>

‎tests/testdata/qgis_server/wms_getfeatureinfo-groupwithoutshortname-notqueryable.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
Content-Type: text/xml; charset=utf-8
33

44
<ServiceExceptionReport xmlns="http://www.opengis.net/ogc" version="1.3.0">
5-
<ServiceException code="LayerNotQueryable">Layer 'groupwithoutshortname' is not queryable</ServiceException>
6-
</ServiceExceptionReport>
5+
<ServiceException code="LayerNotQueryable">The layer 'groupwithoutshortname' is not queryable.</ServiceException>
6+
</ServiceExceptionReport>

‎tests/testdata/qgis_server/wms_getfeatureinfo-invalid-format.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
Content-Type: text/xml; charset=utf-8
33

44
<ServiceExceptionReport version="1.3.0" xmlns="http://www.opengis.net/ogc">
5-
<ServiceException code="InvalidFormat">Invalid INFO_FORMAT parameter</ServiceException>
5+
<ServiceException code="InvalidFormat">The format 'InvalidFormat' from INFO_FORMAT is not supported.</ServiceException>
66
</ServiceExceptionReport>

‎tests/testdata/qgis_server/wms_getfeatureinfo-testlayer3-notqueryable.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
Content-Type: text/xml; charset=utf-8
33

44
<ServiceExceptionReport xmlns="http://www.opengis.net/ogc" version="1.3.0">
5-
<ServiceException code="LayerNotQueryable">Layer 'testlayer3' is not queryable</ServiceException>
6-
</ServiceExceptionReport>
5+
<ServiceException code="LayerNotQueryable">The layer 'testlayer3' is not queryable.</ServiceException>
6+
</ServiceExceptionReport>

‎tests/testdata/qgis_server/wms_getfeatureinfo_invalid_query_layers.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
Content-Type: text/xml; charset=utf-8
33

44
<ServiceExceptionReport xmlns="http://www.opengis.net/ogc" version="1.3.0">
5-
<ServiceException code="LayerNotDefined">Layer 'InvalidLayer' not found</ServiceException>
5+
<ServiceException code="LayerNotDefined">The layer 'InvalidLayer' does not exist.</ServiceException>
66
</ServiceExceptionReport>

0 commit comments

Comments
 (0)
Please sign in to comment.