'Test date representation with custom format (=override L10n setting)'

def testDatetimeRepresentCustomFormat(self):

    settings = current.deployment_settings
    assertEqual = self.assertEqual
    represent = S3DateTime.datetime_represent
    dt = datetime.datetime(2015, 5, 3, 13, 38, 13)
    settings.L10n.date_format = '%Y-%m-%d'
    settings.L10n.time_format = '%H:%M:%S'
    assertEqual(represent(dt), '2015-05-03    13:38:13')
    assertEqual(represent(dt, format='%m/%d/%y    %I:%M    %p'), '05/03/15    01:38    PM')
