Mercurial > bzapi
changeset 6:c9a268d0fa74
added pathetic test suite
author | Atul Varma <varmaa@toolness.com> |
---|---|
date | Wed, 23 Dec 2009 14:06:26 -0800 |
parents | ac540e90b1dd |
children | b788a347af03 |
files | test.py |
diffstat | 1 files changed, 15 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test.py Wed Dec 23 14:06:26 2009 -0800 @@ -0,0 +1,15 @@ +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()