Esempio n. 1
0
    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)))
Esempio n. 2
0
    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)))
Esempio n. 3
0
    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)))
Esempio n. 4
0
    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)))
Esempio n. 5
0
    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)))
Esempio n. 6
0
    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)))
Esempio n. 7
0
    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)))
Esempio n. 8
0
    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)))