Ignore:
Timestamp:
27 Jun 2010, 08:35:27 (15 years ago)
Author:
uli
Message:

Update tests to check typical accessor methods for JAMB tables.

File:
1 edited

Legend:

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

    r5237 r5241  
    8787        exists = os.path.exists(path)
    8888        self.assertEqual(exists, False)
     89        self.assertEqual(0, len(list(table)))
    8990
    9091    def test_import_datetime(self):
     
    9899        self.assertTrue(table.import_datetime is None)
    99100
     101    def test_keys(self):
     102        table = JAMBDataTable()
     103        self.assertFalse('91100546DD' in table.keys())
     104        table.importFromCSV(self.datafile)
     105        self.assertTrue('91100546DD' in table.keys())
     106        self.assertFalse('91100546DE' in table.keys())
    100107
     108    def test_items(self):
     109        table = JAMBDataTable()
     110        self.assertEqual([], list(table.items()))
     111        table.importFromCSV(self.datafile)
     112        self.assertNotEqual([], list(table.items()))
     113       
    101114class JAMBTableFunctionalTestCase(JAMBTableTestCaseBase):
    102115    """A test case where we check JAMB tables inside a site.
Note: See TracChangeset for help on using the changeset viewer.