'Test custom formatting of dates (=overriding L10n setting)'

def testDateRepresentCustomFormat(self):

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