def testNoTZ(self): self.failUnlessEqual( datetimeToRFC2822Date(datetime(2013, 10, 26, 1, 0, 33)), "Sat, 26 Oct 2013 01:00:33")
def testWayInPast(self): self.failUnlessEqual( datetimeToRFC2822Date(datetime(1811, 1, 2, 23, 15, 37)), "Wed, 02 Jan 1811 23:15:37")
def testTZ(self): tz = ICUtzinfo.getInstance("Africa/Johannesburg") self.failUnlessEqual( datetimeToRFC2822Date(datetime(2004, 4, 13, 13, 13, 0, tzinfo=tz)), "Tue, 13 Apr 2004 13:13:00 +0200")
def testWayInFuture(self): self.failUnlessEqual( datetimeToRFC2822Date(datetime(2171, 11, 3, 2, 45, 3)), "Sun, 03 Nov 2171 02:45:03")
def testNoTZ(self): self.failUnlessEqual( datetimeToRFC2822Date(datetime(2013, 10, 26, 1, 0, 33)), "Sat, 26 Oct 2013 01:00:33" )
def testTZ(self): tz = ICUtzinfo.getInstance("Africa/Johannesburg") self.failUnlessEqual( datetimeToRFC2822Date(datetime(2004, 4, 13, 13, 13, 0, tzinfo=tz)), "Tue, 13 Apr 2004 13:13:00 +0200" )
def testWayInPast(self): self.failUnlessEqual( datetimeToRFC2822Date(datetime(1811, 1, 2, 23, 15, 37)), "Wed, 02 Jan 1811 23:15:37" )
def testWayInFuture(self): self.failUnlessEqual( datetimeToRFC2822Date(datetime(2171, 11, 3, 2, 45, 3)), "Sun, 03 Nov 2171 02:45:03" )