def test_dateTimeField_with_inputformat(self):
        f = forms.DateTimeField(input_formats=["%m.%d.%Y %H:%M:%S", "%m-%d-%Y %H:%M"])
        # Parse a date in an unaccepted format; get an error
        self.assertRaises(forms.ValidationError, f.clean, '13:30:05 21.12.2010')
        self.assertRaises(forms.ValidationError, f.clean, '2010-12-21 13:30:05')

        # Parse a date in a valid format, get a parsed result
        result = f.clean('12.21.2010 13:30:05')
        self.assertEqual(result, datetime(2010,12,21,13,30,5))

        # Check that the parsed result does a round trip to the same format
        text = f.widget._format_value(result)
        self.assertEqual(text, "01:30:05 PM 21/12/2010")

        # Parse a date in a valid format, get a parsed result
        result = f.clean('12-21-2010 13:30')
        self.assertEqual(result, datetime(2010,12,21,13,30))

        # Check that the parsed result does a round trip to default format
        text = f.widget._format_value(result)
        self.assertEqual(text, "01:30:00 PM 21/12/2010")
Test smoothing part of HoltSmoothing.
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.2/tests/regressiontests/forms/tests/input_formats.py/CustomDateTimeInputFormatsTests.test_dateTimeField_with_inputformat--crossover with--dataset/ETHPy150Open T-002/pycast/pycast/tests/methodtest.py/HoltMethodTest.second_smoothing_test