Ignore:
Timestamp:
16 Apr 2012, 20:56:59 (13 years ago)
Author:
Henrik Bettermann
Message:

Part 1: Add tzinfo to all persistent datetime objects.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py

    r8119 r8182  
    2626import grok
    2727from zope.event import notify
    28 from zope.component import createObject, queryUtility
     28from zope.component import createObject, queryUtility, getUtility
    2929from zope.component.hooks import setSite, clearSite
    3030from zope.catalog.interfaces import ICatalog
     
    4040from waeup.kofa.university.faculty import Faculty
    4141from waeup.kofa.university.department import Department
    42 from waeup.kofa.interfaces import IUserAccount
     42from waeup.kofa.interfaces import IUserAccount, IKofaUtils
    4343from waeup.kofa.authentication import LocalRoleSetEvent
    4444from waeup.kofa.hostels.hostel import Hostel, Bed, NOT_OCCUPIED
     
    121121        # Create 5 access codes with prefix'PWD'
    122122        pin_container = self.app['accesscodes']
     123        tz = getUtility(IKofaUtils).tzinfo
    123124        pin_container.createBatch(
    124             datetime.now(), 'some_userid', 'PWD', 9.99, 5)
     125            datetime.now(tz), 'some_userid', 'PWD', 9.99, 5)
    125126        pins = pin_container['PWD-1'].values()
    126127        self.pwdpins = [x.representation for x in pins]
Note: See TracChangeset for help on using the changeset viewer.