Mercurial > bzapi
view test.py @ 6:c9a268d0fa74
added pathetic test suite
author | Atul Varma <varmaa@toolness.com> |
---|---|
date | Wed, 23 Dec 2009 14:06:26 -0800 |
parents | |
children | 2731713f61a8 |
line wrap: on
line source
import unittest import bzapi class Tests(unittest.TestCase): def test_datetime_from_iso(self): date = bzapi.datetime_from_iso('2009-06-11T22:31:24Z') self.assertEqual(str(date), '2009-06-11 22:31:24') def test_datetime_from_rfc1123(self): date = bzapi.datetime_from_rfc1123('Wed, 23 Dec 2009 20:42:59 GMT') self.assertEqual(str(date), '2009-12-23 20:42:59') if __name__ == '__main__': unittest.main()