'Test validation with calendar-override'

def testValidationWithAlternativeCalendar(self):

    assertEqual = self.assertEqual
    current.calendar = S3Calendar('Gregorian')
    validate = IS_UTC_DATE(calendar='Persian')
    dtstr = '1390-08-28'
    (value, error) = validate(dtstr)
    assertEqual(error, None)
    assertEqual(value, datetime.date(2011, 11, 19))
    dtstr_ = validate.formatter(value)
    assertEqual(dtstr_, dtstr)
    current.calendar = S3Calendar('Persian')
    validate = IS_UTC_DATE(calendar='Gregorian')
    dtstr = '2011-11-19'
    (value, error) = validate(dtstr)
    assertEqual(error, None)
    assertEqual(value, datetime.date(2011, 11, 19))
    dtstr_ = validate.formatter(value)
    assertEqual(dtstr_, dtstr)
