def test_that_it_truncates_the_time_part(self): tuesday = datetime.datetime(2013, 4, 9, 23, 12) end = WEEK.end(tuesday) assert_that(end, is_(datetime.datetime(2013, 4, 15)))
def test_that_it_returns_the_next_monday_for_monday_after_midnight(self): monday = datetime.datetime(2013, 4, 8, 23, 12) end = WEEK.end(monday) assert_that(end, is_(datetime.datetime(2013, 4, 15)))
def test_that_it_returns_next_monday_for_midweek(self): tuesday = datetime.datetime(2013, 4, 9) end = WEEK.end(tuesday) assert_that(end, is_(datetime.datetime(2013, 4, 15)))
def test_that_it_returns_the_same_day_for_monday_midnight(self): monday = datetime.datetime(2013, 4, 8, 0, 0) end = WEEK.end(monday) assert_that(end, is_(datetime.datetime(2013, 4, 8)))