def test_valid_date(self):
     self.assertEquals(
         validators.apidate("2007-01-25"),
         datetime.date(2007, 1, 25)
         )
示例#2
0
 def test_valid_date(self):
     self.assertEquals(
         validators.apidate("2007-01-25"),
         datetime.date(2007, 1, 25)
         )
 def test_invalid_date(self):
     with self.assertRaises(validators.Invalid):
         validators.apidate("1-1-2012")
示例#4
0
 def test_invalid_date(self):
     with self.assertRaises(validators.Invalid):
         validators.apidate("1-1-2012")