Changeset 5250 for main/waeup.sirp


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

Add interface compliance tests.

File:
1 edited

Legend:

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

    r5241 r5250  
    3333from datetime import datetime
    3434
     35from zope.interface.verify import verifyClass, verifyObject
    3536from zope.site import LocalSiteManager
    3637from zope.site.hooks import setSite, clearSite
    3738
    3839from waeup.sirp.app import University
     40from waeup.sirp.datacenter import DataCenter
    3941from waeup.sirp.jambtables import JAMBDataTable
    40 from waeup.sirp.datacenter import DataCenter
     42from waeup.sirp.jambtables.interfaces import IJAMBDataTable
     43
    4144
    4245class JAMBTableTestCaseBase(unittest.TestCase):
     
    111114        table.importFromCSV(self.datafile)
    112115        self.assertNotEqual([], list(table.items()))
     116
     117    def test_interface_compliance(self):
     118        self.assertTrue(verifyClass(IJAMBDataTable, JAMBDataTable))
     119        table = JAMBDataTable()
     120        self.assertTrue(verifyObject(IJAMBDataTable, table))
     121        table.importFromCSV(self.datafile)
     122        self.assertTrue(verifyObject(IJAMBDataTable, table))
    113123       
    114124class JAMBTableFunctionalTestCase(JAMBTableTestCaseBase):
Note: See TracChangeset for help on using the changeset viewer.