Ignore:
Timestamp:
7 May 2012, 10:15:21 (13 years ago)
Author:
uli
Message:

Add hash by default when exporting dates.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/utils/tests/test_batching.py

    r8228 r8380  
    1616## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
    1717##
     18import datetime
    1819import doctest
    1920import logging
     
    268269        result4 = exporter.mangle_value(u'string', 'foo')
    269270        result5 = exporter.mangle_value(None, 'foo')
     271        result6 = exporter.mangle_value(datetime.date(2012, 4, 1), 'foo')
     272        result7 = exporter.mangle_value(
     273            datetime.datetime(2012, 4, 1, 12, 1, 1), 'foo')
    270274        self.assertEqual(
    271275            (result1, result2, result3, result4, result5),
     
    273277        self.assertEqual(type(result3), type('string'))
    274278        self.assertEqual(type(result4), type('string'))
     279        # dates are formatted with trailing hash
     280        self.assertEqual(result6, '2012-04-01#')
     281        # datetimes are formatted as yyyy-mm-dd hh:mm:ss
     282        self.assertEqual(result7, '2012-04-01 12:01:01')
    275283        return
    276284
Note: See TracChangeset for help on using the changeset viewer.