[Zope-Checkins] CVS: Zope/lib/python/DateTime/tests - testDateTime.py:1.6
Andreas Jung
andreas@digicool.com
Mon, 14 Jan 2002 10:54:14 -0500
Update of /cvs-repository/Zope/lib/python/DateTime/tests
In directory cvs.zope.org:/tmp/cvs-serv28433/tests
Modified Files:
testDateTime.py
Log Message:
added ISO8601 tests
=== Zope/lib/python/DateTime/tests/testDateTime.py 1.5 => 1.6 ===
+ 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)