@@ -153,6 +153,7 @@ def test_time(self):
153153 XSDDate (datetime .datetime .now ())
154154 self .assertFalse (XSDTime .is_valid ('Jan 12, 2019' ))
155155 self .assertFalse (XSDTime .is_valid (datetime .datetime .now ()))
156+ self .assertFalse (XSDTime .is_valid ("2019-07-06T17:22:39Z" ))
156157 self .assertTrue (XSDTime .is_valid (v ))
157158
158159 def test_date (self ):
@@ -168,6 +169,9 @@ def test_date(self):
168169 XSDDate ('Jan 12, 2019' )
169170 with self .assertRaises (ValueError ):
170171 XSDDate (datetime .datetime .now ())
172+ with self .assertRaises (ValueError ):
173+ XSDDate ("2019-07-06T17:22:39Z" )
174+
171175 lax ()
172176 bv = XSDDate ('Jan 12, 2019' )
173177 self .assertEqual ('Jan 12, 2019' , bv )
@@ -188,6 +192,7 @@ def test_datetime(self):
188192 vstr = str (Literal (v ).value )
189193 self .assertEqual ('2019-07-06 17:22:39.007300' , vstr ) # Note that this has no 'T'
190194 self .assertEqual ('2019-07-06T17:22:39.007300' , XSDDateTime (vstr ))
195+ self .assertEqual ('2019-07-06T17:22:39+00:00' , XSDDateTime ("2019-07-06T17:22:39Z" ))
191196 with self .assertRaises (ValueError ):
192197 XSDDateTime ('Jan 12, 2019' )
193198 lax ()
0 commit comments