-
-
Notifications
You must be signed in to change notification settings - Fork 152
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add test for catching bad function names
- Loading branch information
1 parent
b814b5c
commit 3b5303b
Showing
2 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
tests/expected/suites_default_post_GetRecords-filter-function-bad.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<!-- PYCSW_VERSION --> | ||
<ows:ExceptionReport xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:dct="http://purl.org/dc/terms/" xmlns:ows="http://www.opengis.net/ows" xmlns:gml="http://www.opengis.net/gml" xmlns:dif="http://gcmd.gsfc.nasa.gov/Aboutus/xml/dif/" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:ogc="http://www.opengis.net/ogc" xmlns:fgdc="http://www.opengis.net/cat/csw/csdgm" xmlns:csw="http://www.opengis.net/cat/csw/2.0.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:os="http://a9.com/-/spec/opensearch/1.1/" xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope" xmlns:sitemap="http://www.sitemaps.org/schemas/sitemap/0.9" version="1.2.0" language="en-US" xsi:schemaLocation="http://www.opengis.net/ows http://schemas.opengis.net/ows/1.0.0/owsExceptionReport.xsd"> | ||
<ows:Exception locator="service" exceptionCode="InvalidRequest"> | ||
<ows:ExceptionText>Invalid Constraint: Invalid Filter request: Invalid ogc:Function: foo</ows:ExceptionText> | ||
</ows:Exception> | ||
</ows:ExceptionReport> |
17 changes: 17 additions & 0 deletions
17
tests/suites/default/post/GetRecords-filter-function-bad.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?> | ||
<csw:GetRecords xmlns:csw="http://www.opengis.net/cat/csw/2.0.2" xmlns:ogc="http://www.opengis.net/ogc" service="CSW" version="2.0.2" resultType="results" startPosition="1" maxRecords="5" outputFormat="application/xml" outputSchema="http://www.opengis.net/cat/csw/2.0.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/cat/csw/2.0.2 http://schemas.opengis.net/csw/2.0.2/CSW-discovery.xsd"> | ||
<csw:Query typeNames="csw:Record"> | ||
<csw:ElementSetName>brief</csw:ElementSetName> | ||
<csw:Constraint version="1.1.0"> | ||
<ogc:Filter> | ||
<ogc:PropertyIsEqualTo> | ||
<ogc:Function name="foo"> | ||
<ogc:PropertyName>dc:title</ogc:PropertyName> | ||
</ogc:Function> | ||
<ogc:Literal>LOREM IPSUM</ogc:Literal> | ||
</ogc:PropertyIsEqualTo> | ||
</ogc:Filter> | ||
</csw:Constraint> | ||
</csw:Query> | ||
</csw:GetRecords> | ||
|