- Timestamp:
- 7 Mar 2011, 02:14:02 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/applicants/jambtables/tests/test_jambtables.py
r5797 r5800 38 38 from zope.site import LocalSiteManager 39 39 from zope.site.hooks import setSite, clearSite 40 from zope.site.testing import createSiteManager 40 41 41 42 from waeup.sirp.app import University 42 43 from waeup.sirp.datacenter import DataCenter 44 from waeup.sirp.testing import WAeUPSIRPUnitTestLayer 43 45 from waeup.sirp.applicants.jambtables import ( 44 JAMBDataPlugin, JAMBDataRoot, 46 JAMBDataPlugin, JAMBDataRoot, get_jambdata, 45 47 ) 46 48 from waeup.sirp.applicants.jambtables.interfaces import ( 47 49 IJAMBDataRoot, 48 50 ) 51 from waeup.sirp.applicants import Applicant 52 from waeup.sirp.applicants.container import ApplicantsContainer 53 49 54 50 55 class FakeSite(dict): … … 175 180 return 176 181 177 182 class GetJAMBDataTestCase(unittest.TestCase): 183 184 layer = WAeUPSIRPUnitTestLayer 185 186 def setUp(self): 187 self.app = University() 188 # Fill up some JAMB data... 189 self.appl1 = Applicant() 190 self.appl2 = Applicant() 191 self.app['jambdata']['91100546DD'] = self.appl1 192 self.app['jambdata']['91100546DE'] = self.appl2 193 createSiteManager(self.app, setsite=True) 194 return 195 196 def tearDown(self): 197 pass 198 199 def test_contained(self): 200 self.assertEqual(get_jambdata('91100546DD'), self.appl1) 201 return 202 203 def test_not_contained(self): 204 self.assertEqual(get_jambdata('not-existing'), None) 205 return 206 178 207 def test_suite(): 179 208 suite = unittest.TestSuite() 180 209 for testcase in [ 181 JAMBDataRootTestCase, JAMBDataPluginTestCase, 210 JAMBDataRootTestCase, JAMBDataPluginTestCase, GetJAMBDataTestCase, 182 211 ]: 183 212 suite.addTest(unittest.TestLoader().loadTestsFromTestCase(
Note: See TracChangeset for help on using the changeset viewer.