

def test_GenericDateTimeField(self):
    error_invalid = ['Enter a valid date/time.']
    valid = {
        datetime.date(2006, 10, 25): datetime.datetime(2006, 10, 25, 0, 0),
        datetime.datetime(2006, 10, 25, 14, 30): datetime.datetime(2006, 10, 25, 14, 30),
        datetime.datetime(2006, 10, 25, 14, 30, 59): datetime.datetime(2006, 10, 25, 14, 30, 59),
        datetime.datetime(2006, 10, 25, 14, 30, 59, 200): datetime.datetime(2006, 10, 25, 14, 30, 59, 200),
        '2006-10-25 14:30:45': datetime.datetime(2006, 10, 25, 14, 30, 45),
        '2006-10-25 14:30:00': datetime.datetime(2006, 10, 25, 14, 30),
        '2006-10-25 14:30': datetime.datetime(2006, 10, 25, 14, 30),
        '2006-10-25': datetime.datetime(2006, 10, 25, 0, 0),
        '25/10/2006 14:30:45': datetime.datetime(2006, 10, 25, 14, 30, 45),
        '25/10/2006 14:30:00': datetime.datetime(2006, 10, 25, 14, 30),
        '25/10/2006 14:30': datetime.datetime(2006, 10, 25, 14, 30),
        '25/10/2006': datetime.datetime(2006, 10, 25, 0, 0),
        '25/10/06 14:30:45': datetime.datetime(2006, 10, 25, 14, 30, 45),
        '25/10/06 14:30:00': datetime.datetime(2006, 10, 25, 14, 30),
        '25/10/06 14:30': datetime.datetime(2006, 10, 25, 14, 30),
        '25/10/06': datetime.datetime(2006, 10, 25, 0, 0),
    }
    invalid = {
        'hello': error_invalid,
        '2006-10-25 4:30 p.m.': invalid,
    }
    self.assertFieldOutput(DateTimeField, valid, invalid, empty_value=None)
    valid = {
        datetime.date(2006, 10, 25): datetime.datetime(2006, 10, 25, 0, 0),
        datetime.datetime(2006, 10, 25, 14, 30): datetime.datetime(2006, 10, 25, 14, 30),
        datetime.datetime(2006, 10, 25, 14, 30, 59): datetime.datetime(2006, 10, 25, 14, 30, 59),
        datetime.datetime(2006, 10, 25, 14, 30, 59, 200): datetime.datetime(2006, 10, 25, 14, 30, 59, 200),
        '2006 10 25 2:30 PM': datetime.datetime(2006, 10, 25, 14, 30),
    }
    invalid = {
        '2006-10-25 14:30:45': error_invalid,
    }
    kwargs = {
        'input_formats': ['%Y %m %d %I:%M %p'],
    }
    self.assertFieldOutput(DateTimeField, valid, invalid, field_kwargs=kwargs, empty_value=None)

dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.4/tests/regressiontests/localflavor/generic/tests.py GenericLocalFlavorTests.test_GenericDateTimeField/VarMisuse@387/542 `error_invalid`->`invalid`