def test_friday_current(self): d = 23 m = 9 y = 2016 expected = 'Friday' self.assertEquals(convert(d, m, y), expected) self.assertEquals(get_day_of_week(d, m, y), expected) self.assertEquals(getweekday(d, m, y), expected)
def test_day_not_leap(self): d = 29 m = 2 y = 2015 expected = 'Invalid Date' self.assertEquals(convert(d, m, y), expected) self.assertEquals(get_day_of_week(d, m, y), expected) self.assertEquals(getweekday(d, m, y), expected)
def test_day_last(self): d = 31 m = 12 y = 9999 expected = 'Friday' self.assertEquals(convert(d, m, y), expected) self.assertEquals(get_day_of_week(d, m, y), expected) self.assertEquals(getweekday(d, m, y), expected)
def test_day_1(self): d = 1 m = 1 y = 1 expected = 'Monday' self.assertEquals(convert(d, m, y), expected) self.assertEquals(get_day_of_week(d, m, y), expected) self.assertEquals(getweekday(d, m, y), expected)
def test_day_leap(self): d = 29 m = 2 y = 2016 expected = 'Monday' self.assertEquals(convert(d, m, y), expected) self.assertEquals(get_day_of_week(d, m, y), expected) self.assertEquals(getweekday(d, m, y), expected)
def test_invalid_month(self): d = 23 m = 'September' y = 2016 expected = 'Invalid Date' self.assertEquals(convert(d, m, y), expected) self.assertEquals(get_day_of_week(d, m, y), expected) self.assertEquals(getweekday(d, m, y), expected)
def test_invalid_leap_year(self): d = 29 m = 2 y = 1999 expected = 'Invalid Date' self.assertEquals(get_day_of_week(d, m, y), expected) self.assertEquals(convert(d, m, y), expected) self.assertEquals(getweekday(d, m, y), expected)
def test_valid_leap_year(self): d = 29 m = 2 y = 2000 expected = 'Tuesday' self.assertEquals(get_day_of_week(d, m, y), expected) self.assertEquals(convert(d, m, y), expected) self.assertEquals(getweekday(d, m, y), expected)
def test_invalid_float(self): d = 5 m = 9 y = 2016.5 expected = 'Invalid Date' self.assertEquals(get_day_of_week(d, m, y), expected) self.assertEquals(convert(d, m, y), expected) self.assertEquals(getweekday(d, m, y), expected)
def test_valid_date(self): d = 5 m = 9 y = 2016 expected = 'Monday' self.assertEquals(get_day_of_week(d, m, y), expected) self.assertEquals(convert(d, m, y), expected) self.assertEquals(getweekday(d, m, y), expected)