def test_lowYear(self): date = datetime.date.today() - datetime.timedelta(weeks=80) if self.printing: print(date) self.assertEqual( parseDate( str(date.day) + '.' + str(date.month) + '.' + str(date.year)), str(date.year) + '-' + str(date.month) + '-' + str(date.day))
def test_Now(self): date = datetime.date.today() if self.printing: print(date) self.assertEqual( parseDate( str(date.day) + '.' + str(date.month) + '.' + str(date.year)), str(date.year) + '-' + str(date.month) + '-' + str(date.day))
def test_bigDay(self): date = datetime.date.today() + datetime.timedelta(days=1) if self.printing: print(date) self.assertEqual( parseDate( str(date.day) + '.' + str(date.month) + '.' + str(date.year)), None)
def test_badStriing(self): i = 1 if self.printing: print(self.tests[i][2]) self.assertEqual(parseDate(self.tests[i][0]), self.tests[i][1], self.tests[i][2])
def test_goodDate(self): i = 0 if self.printing: print(self.tests[i][2]) self.assertEqual(parseDate(self.tests[i][0]), self.tests[i][1], self.tests[i][2])