'TimeFields with manually specified input formats can accept those formats'

def test_timeField_with_inputformat(self):

    f = forms.TimeField(input_formats=['%H.%M.%S', '%H.%M'])
    self.assertRaises(forms.ValidationError, f.clean, '1:30:05    PM')
    self.assertRaises(forms.ValidationError, f.clean, '13:30:05')
    result = f.clean('13.30.05')
    self.assertEqual(result, time(13, 30, 5))
    text = f.widget._format_value(result)
    self.assertEqual(text, '13:30:05')
    result = f.clean('13.30')
    self.assertEqual(result, time(13, 30, 0))
    text = f.widget._format_value(result)
    self.assertEqual(text, '13:30:00')
