[Zope-Checkins] CVS: Zope/lib/python/DateTime/tests - testDateTime.py:1.4.24.3
Andreas Jung
andreas@digicool.com
Mon, 14 Jan 2002 10:55:29 -0500
Update of /cvs-repository/Zope/lib/python/DateTime/tests
In directory cvs.zope.org:/tmp/cvs-serv28950
Modified Files:
Tag: Zope-2_5-branch
testDateTime.py
Log Message:
added ISO8601 test
=== Zope/lib/python/DateTime/tests/testDateTime.py 1.4.24.2 => 1.4.24.3 ===
# controversal.
+ def testISO8601(self):
+ ''' iso 8601 dates '''
+
+ ref0 = DateTime('2002/5/2 8:00am GMT')
+ ref1 = DateTime('2002/5/2 8:00am US/Eastern')
+
+ isoDt = DateTime('2002-05-02T08:00:00')
+ self.assertEqual( ref0, isoDt)
+ isoDt = DateTime('2002-05-02T08:00:00Z')
+ self.assertEqual( ref0, isoDt)
+
+ isoDt = DateTime('2002-05-02T08:00:00Z-04:00')
+ self.assertEqual( ref1, isoDt)
+
+
def test_suite():
return unittest.makeSuite(DateTimeTests)