Ignore:
Timestamp:
27 Jun 2010, 09:43:18 (14 years ago)
Author:
uli
Message:

Update tests to reflect interface changes.

File:
1 edited

Legend:

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

    r5250 r5253  
    102102        self.assertTrue(table.import_datetime is None)
    103103
     104    def test_importer_username(self):
     105        table = JAMBDataTable()
     106        self.assertTrue(table.importer_username is None)
     107        table.importFromCSV(self.datafile, 'manfred')
     108        self.assertEqual(table.importer_username, u'manfred')
     109        self.assertTrue(isinstance(table.importer_username, unicode))
     110        table.importFromCSV(self.datafile, 'fred')
     111        self.assertEqual(table.importer_username, u'fred')
     112        table.importFromCSV(self.datafile)
     113        self.assertTrue(table.importer_username is None)
     114        table.clear()
     115        self.assertTrue(table.importer_username is None)
     116
    104117    def test_keys(self):
    105118        table = JAMBDataTable()
     
    121134        table.importFromCSV(self.datafile)
    122135        self.assertTrue(verifyObject(IJAMBDataTable, table))
    123        
     136
    124137class JAMBTableFunctionalTestCase(JAMBTableTestCaseBase):
    125138    """A test case where we check JAMB tables inside a site.
Note: See TracChangeset for help on using the changeset viewer.