예제 #1
0
 def test_date_decode(self):
     data = '1975-05-07'
     value = ISOCalendarDate.decode(data)
     expected = date(1975, 05, 07)
     self.assertEqual(value, expected)
예제 #2
0
 def test_date_encode(self):
     data = date(1975, 05, 07)
     value = ISOCalendarDate.encode(data)
     expected = '1975-05-07'
     self.assertEqual(value, expected)
예제 #3
0
 def test_date_decode_d(self):
     data = "1975"
     value = ISOCalendarDate.decode(data)
     expected = date(1975, 1, 1)
     self.assertEqual(value, expected)