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

def test_dateTimeField_with_inputformat(self):

    f = forms.DateTimeField(input_formats=['%I:%M:%S    %p    %d.%m.%Y', '%I:%M    %p    %d-%m-%Y'])
    with self.assertRaises(forms.ValidationError):
        f.clean('2010-12-21    13:30:05')
    result = f.clean('1:30:05    PM    21.12.2010')
    self.assertEqual(result, datetime(2010, 12, 21, 13, 30, 5))
    text = f.widget.format_value(result)
    self.assertEqual(text, '2010-12-21    13:30:05')
    result = f.clean('1:30    PM    21-12-2010')
    self.assertEqual(result, datetime(2010, 12, 21, 13, 30))
    text = f.widget.format_value(result)
    self.assertEqual(text, '2010-12-21    13:30:00')
