'Test date representation with default format'

def testDateRepresentDefaultFormat(self):

    settings = current.deployment_settings
    assertEqual = self.assertEqual
    represent = S3DateTime.date_represent
    date = datetime.date(2015, 5, 3)
    settings.L10n.date_format = '%Y-%m-%d'
    assertEqual(represent(date), '2015-05-03')
    settings.L10n.date_format = '%m/%d/%y'
    assertEqual(represent(date), '05/03/15')
    settings.L10n.date_format = '%a    %d    %b,    %Y'
    assertEqual(represent(date), 'Sun    03    May,    2015')
    settings.L10n.date_format = '%d-%b-%Y'
    assertEqual(represent(date), '03-May-2015')
