Skip to content
Permalink
Browse files

Fix WFS tests

  • Loading branch information
nyalldawson committed May 14, 2020
1 parent 242973a commit c4e4f007f3b72556da40c4638264720fd919ddf0
Showing with 21 additions and 0 deletions.
  1. +21 −0 tests/src/python/test_provider_wfs.py
@@ -82,6 +82,12 @@ def messages(self):

class TestPyQgsWFSProvider(unittest.TestCase, ProviderTestCase):

def treat_date_as_datetime(self):
return True

def treat_time_as_string(self):
return True

@classmethod
def setUpClass(cls):
"""Run before all tests"""
@@ -130,6 +136,9 @@ def setUpClass(cls):
<xsd:element maxOccurs="1" minOccurs="0" name="name" nillable="true" type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="0" name="name2" nillable="true" type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="0" name="num_char" nillable="true" type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="0" name="dt" nillable="true" type="xsd:datetime"/>
<xsd:element maxOccurs="1" minOccurs="0" name="date" nillable="true" type="xsd:datetime"/>
<xsd:element maxOccurs="1" minOccurs="0" name="time" nillable="true" type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="0" name="geometryProperty" nillable="true" type="gml:PointPropertyType"/>
<!-- check that an element with ref without name doesn't confuse the DescribeFeatureType analyzer -->
<xsd:element maxOccurs="0" minOccurs="0" ref="my:somethingElseType"/>
@@ -165,6 +174,9 @@ def setUpClass(cls):
<my:name>Orange</my:name>
<my:name2>oranGe</my:name2>
<my:num_char>1</my:num_char>
<my:dt>2020-05-03 12:13:14</my:dt>
<my:date>2020-05-03</my:date>
<my:time>12:13:14</my:time>
</my:typename>
</wfs:member>
<wfs:member>
@@ -176,6 +188,9 @@ def setUpClass(cls):
<my:name>Apple</my:name>
<my:name2>Apple</my:name2>
<my:num_char>2</my:num_char>
<my:dt>2020-05-04 12:14:14</my:dt>
<my:date>2020-05-04</my:date>
<my:time>12:14:14</my:time>
</my:typename>
</wfs:member>
<wfs:member>
@@ -187,6 +202,9 @@ def setUpClass(cls):
<my:name>Honey</my:name>
<my:name2>Honey</my:name2>
<my:num_char>4</my:num_char>
<my:dt>2021-05-04 13:13:14</my:dt>
<my:date>2021-05-04</my:date>
<my:time>13:13:14</my:time>
</my:typename>
</wfs:member>
<wfs:member>
@@ -206,6 +224,9 @@ def setUpClass(cls):
<my:cnt>-200</my:cnt>
<my:name2>NuLl</my:name2>
<my:num_char>5</my:num_char>
<my:dt>2020-05-04 12:13:14</my:dt>
<my:date>2020-05-02</my:date>
<my:time>12:13:01</my:time>
</my:typename>
</wfs:member>
</wfs:FeatureCollection>""".encode('UTF-8'))

0 comments on commit c4e4f00

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