Beispiel #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)
Beispiel #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)
Beispiel #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)
Beispiel #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)
Beispiel #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)
Beispiel #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)