Пример #1
0
 def test_is_in_time_range_wrong_day(self):
     x = datetime(2020, 3, 6, 15, 30)  # Friday
     result = is_in_time_range(x, VALID_RANGE)
     self.assertEqual(result, False)
Пример #2
0
 def test_is_in_time_range_late(self):
     x = datetime(2020, 3, 2, 15, 30)
     result = is_in_time_range(x, VALID_RANGE)
     self.assertEqual(result, False)
Пример #3
0
 def test_is_in_time_range_true(self):
     x = datetime(2020, 3, 2, 8, 30)  # Monday
     result = is_in_time_range(x, VALID_RANGE)
     self.assertEqual(result, True)
Пример #4
0
    def test_is_in_time_range_wrong_day(self):
        from consoleme.lib.generic import is_in_time_range

        x = datetime(2020, 3, 6, 15, 30)  # Friday
        result = is_in_time_range(x, VALID_RANGE)
        self.assertEqual(result, False)
Пример #5
0
    def test_is_in_time_range_early(self):
        from consoleme.lib.generic import is_in_time_range

        x = datetime(2020, 3, 2, 7, 30)
        result = is_in_time_range(x, VALID_RANGE)
        self.assertEqual(result, False)
Пример #6
0
    def test_is_in_time_range_true(self):
        from consoleme.lib.generic import is_in_time_range

        x = datetime(2020, 3, 2, 8, 30)  # Monday
        result = is_in_time_range(x, VALID_RANGE)
        self.assertEqual(result, True)