def test_to_iso_with_date(self): assert to_iso(date(1984, 2, 29)) == '1984-02-29'
def test_to_iso_emtpy(self): assert to_iso(None) is None
def test_to_iso_with_datetime(self): assert to_iso(datetime(1984, 2, 29, 1, 2, 3)) == '1984-02-29T01:02:03'
def test_to_iso_with_datetime(self): self.assertEqual(to_iso(datetime(1984, 2, 29, 1, 2, 3)), '1984-02-29T01:02:03')
def test_to_iso_with_date(self): self.assertEqual(to_iso(date(1984, 2, 29)), '1984-02-29')
def test_to_iso_emtpy(self): self.assertEqual(to_iso(None), None)