Ignore:
Timestamp:
17 Apr 2012, 11:19:55 (13 years ago)
Author:
uli
Message:

Let to_timezone ignore not-datetimes.

File:
1 edited

Legend:

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

    r8185 r8192  
    304304        return
    305305
     306    def test_to_timezone_no_dt(self):
     307        # the to_timezone function copes with dates (!= datetimes)
     308        d = datetime.date(2012, 12, 1)
     309        result1 = helpers.to_timezone(d)
     310        result2 = helpers.to_timezone(d, pytz.utc)
     311        self.assertEqual(result1, d)
     312        self.assertEqual(result2, d)
     313        return
    306314
    307315def test_suite():
Note: See TracChangeset for help on using the changeset viewer.