Ignore:
Timestamp:
17 Apr 2012, 23:35:24 (13 years ago)
Author:
uli
Message:
  • Use datetime for applicants containers and
  • Register new datetime widget as default for entering datetimes.

Fixed all tests to work with the new stuff.

As this is just a quick shot I put all changes into one commit
to ease any later rollback.

Location:
main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests
Files:
3 edited

Legend:

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

    r8008 r8200  
    2020import datetime
    2121import os
     22import pytz
    2223import shutil
    2324import tempfile
     
    157158            u'>>de<<\nDieser Text kann von anonymen Benutzern '
    158159            u'gelesen werden.')
    159         self.assertEqual(container.startdate, datetime.date(2012, 3, 1))
    160         self.assertEqual(container.enddate, datetime.date(2012, 4, 25))
     160        self.assertEqual(container.startdate,
     161                         datetime.datetime(2012, 3, 1, 0, 0, tzinfo=pytz.utc))
     162        self.assertEqual(container.enddate,
     163                         datetime.datetime(2012, 4, 25, 0, 0, tzinfo=pytz.utc))
    161164        shutil.rmtree(os.path.dirname(fin_file))
    162165
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_browser.py

    r8069 r8200  
    1919Test the applicant-related UI components.
    2020"""
     21import pytz
    2122import shutil
    2223import tempfile
     
    8990        applicantscontainer.mode = 'create'
    9091        delta = timedelta(days=10)
    91         applicantscontainer.startdate = date.today() - delta
    92         applicantscontainer.enddate = date.today() + delta
     92        applicantscontainer.startdate = datetime.now(pytz.utc) - delta
     93        applicantscontainer.enddate = datetime.now(pytz.utc) + delta
    9394        self.app['applicants']['app2009'] = applicantscontainer
    9495        self.applicantscontainer = self.app['applicants']['app2009']
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_export.py

    r8069 r8200  
    11import datetime
    22import os
     3import pytz
    34import shutil
    45import tempfile
     
    5657        container.description = u'Some Description\nwith linebreak\n'
    5758        container.description += u'<<de>>man spriht deutsh'
    58         container.startdate = datetime.date(2012, 1, 1)
    59         container.enddate = datetime.date(2012, 1, 31)
     59        container.startdate = datetime.datetime(
     60            2012, 1, 1, 12, 0, 0, tzinfo=pytz.utc)
     61        container.enddate = datetime.datetime(
     62            2012, 1, 31, 23, 0, 0, tzinfo=pytz.utc)
    6063        return container
    6164
     
    7477            'dp2012,General Studies 2012/13,app,100,2012,basic,'
    7578            '"Some Description\nwith linebreak\n<<de>>man spriht deutsh",'
    76             '2012-01-01,2012-01-31,1\r\n'
     79            '2012-01-01 12:00:00+00:00,2012-01-31 23:00:00+00:00,1\r\n'
    7780            )
    7881        return
Note: See TracChangeset for help on using the changeset viewer.