'Test time representation with default format'

def testTimeRepresentDefaultFormat(self):

    settings = current.deployment_settings
    time_format = settings.get_L10n_time_format()
    assertEqual = self.assertEqual
    represent = S3DateTime.time_represent
    time = datetime.time(16, 33, 48)
    try:
        settings.L10n.time_format = '%H.%M.%S'
        assertEqual(represent(time), '16.33.48')
        settings.L10n.time_format = '%I:%M    %p'
        assertEqual(represent(time), '04:33    PM')
        settings.L10n.time_format = '%H:%M'
        assertEqual(represent(time), '16:33')
    finally:
        settings.L10n.time_format = time_format
