Example #1
0
    def test_parse_beginning_of_day(self):
        parsed_value = parse_military_time('0000')

        self.assertEqual(
            datetime.time(hour=0, minute=0),
            parsed_value
        )
Example #2
0
    def test_parse_end_of_day_as_2400(self):
        parsed_value = parse_military_time('2400')

        self.assertEqual(
            datetime.time.max,
            parsed_value
        )
Example #3
0
    def test_parse(self):
        parsed_value = parse_military_time('2145')

        self.assertEqual(
            datetime.time(hour=21, minute=45),
            parsed_value
        )
Example #4
0
    def test_parse_beginning_of_day(self):
        parsed_value = parse_military_time('0000')

        self.assertEqual(datetime.time(hour=0, minute=0), parsed_value)
Example #5
0
    def test_parse_end_of_day_as_2400(self):
        parsed_value = parse_military_time('2400')

        self.assertEqual(datetime.time.max, parsed_value)
Example #6
0
    def test_parse(self):
        parsed_value = parse_military_time('2145')

        self.assertEqual(datetime.time(hour=21, minute=45), parsed_value)