def test_datetime_f(self): self.assertEquals(datetime_f(datetime(1990, 9, 21, 19, 11, 19, 626096)), '<nobr>1990-09-21T19:11:19.626096</nobr>') self.assertEquals(len(datetime_f(datetime.now())), 28) self.assertEquals(datetime_f(None), '<nobr>None</nobr>') iso = datetime.now().isoformat()[:10].split('-') [a, b, c] = [int(v) for v in iso] self.assertEquals(datetime_f(datetime(a, b, c)), '<nobr>00:00:00</nobr>')
def test_datetime_f(self): self.assertEquals( datetime_f(datetime(1990, 9, 21, 19, 11, 19, 626096)), '<nobr>1990-09-21T19:11:19.626096</nobr>', ) self.assertEquals(len(datetime_f(datetime.now())), 28) self.assertEquals(datetime_f(None), '<nobr>None</nobr>') iso = datetime.now().isoformat()[:10].split('-') [a, b, c] = [int(v) for v in iso] self.assertEquals( datetime_f(datetime(a, b, c)), '<nobr>00:00:00</nobr>', )