Changeset 5237 for main


Ignore:
Timestamp:
26 Jun 2010, 10:27:57 (15 years ago)
Author:
uli
Message:

Add test for import_datetime.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/branches/ulif-fasttables/src/waeup/sirp/jambtables/tests/test_jambtables.py

    r5236 r5237  
    3030
    3131import grok
     32
     33from datetime import datetime
    3234
    3335from zope.site import LocalSiteManager
     
    8587        exists = os.path.exists(path)
    8688        self.assertEqual(exists, False)
     89
     90    def test_import_datetime(self):
     91        table = JAMBDataTable()
     92        self.assertTrue(table.import_datetime is None)
     93        table.importFromCSV(self.datafile)
     94        now = datetime.now()
     95        diff = now - table.import_datetime
     96        self.assertTrue(diff.seconds < 5)
     97        table.clear()
     98        self.assertTrue(table.import_datetime is None)
    8799
    88100
Note: See TracChangeset for help on using the changeset viewer.