Exemplo n.º 1
0
    def test_that_beginning_of_the_hour_is_a_valid_start_at(self):
        beginning_of_the_hour = d(2013, 10, 18, 12, 0)

        assert_that(HOUR.valid_start_at(beginning_of_the_hour), is_(True))
Exemplo n.º 2
0
    def test_that_middle_of_the_hour_is_not_a_valid_start_at(self):
        middle_of_the_hour = d(2013, 10, 18, 12, 31)

        assert_that(HOUR.valid_start_at(middle_of_the_hour), is_(False))
Exemplo n.º 3
0
 def test_start_of_hour_plus_second_is_invalid(self):
     assert_that(HOUR.valid_start_at(d(2013, 10, 18, 12, 0, 1)), is_(False))
Exemplo n.º 4
0
 def test_start_of_hour_plus_minute_is_invalid(self):
     assert_that(HOUR.valid_start_at(d(2013, 10, 18, 12, 1, 0)), is_(False))
Exemplo n.º 5
0
 def test_start_of_hour_is_valid(self):
     assert_that(HOUR.valid_start_at(d(2013, 10, 18, 12, 0, 0)), is_(True))