Changeset 5682 for main/waeup.sirp/trunk
- Timestamp:
- 25 Jan 2011, 17:06:49 (14 years ago)
- Location:
- main/waeup.sirp/trunk/src/waeup/sirp/applicants
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/applicants/container.py
r5676 r5682 31 31 grok.implements(IApplicantsContainer) 32 32 33 id = None 33 REQUIRES_JAMBDATA = False 34 name = None 34 35 title = None 35 36 description = None … … 69 70 """ 70 71 raise NotImplemented() 72 73 class JAMBBasedApplicantsContainer(ApplicantsContainer): 74 """An applicants container contains university applicants. 75 76 For applicants added to this container JAMB data must be available 77 already. 78 """ 79 REQUIRES_JAMBDATA = True -
main/waeup.sirp/trunk/src/waeup/sirp/applicants/interfaces.py
r5681 r5682 62 62 63 63 """ 64 id = schema.TextLine( 64 REQUIRES_JAMBDATA = schema.Bool( 65 title = u'JAMB data required', 66 description = u'This container requires JAMB data to be available.', 67 required = True, 68 default = False, 69 ) 70 71 name = schema.TextLine( 65 72 title = u'Internal ID', 66 73 required = True, -
main/waeup.sirp/trunk/src/waeup/sirp/applicants/tests/test_container.py
r5676 r5682 26 26 from zope.interface.verify import verifyClass, verifyObject 27 27 from waeup.sirp.applicants import interfaces 28 from waeup.sirp.applicants.container import ApplicantsContainer 28 from waeup.sirp.applicants.container import ( 29 ApplicantsContainer, JAMBBasedApplicantsContainer, 30 ) 29 31 30 32 class ApplicantsContainerTestCase(unittest.TestCase): … … 42 44 return 43 45 46 class JAMBBasedApplicantsContainerTestCase(unittest.TestCase): 47 48 def test_interfaces(self): 49 # Make sure the correct interfaces are implemented. 50 self.assertTrue( 51 verifyClass( 52 interfaces.IApplicantsContainer, JAMBBasedApplicantsContainer) 53 ) 54 self.assertTrue( 55 verifyObject( 56 interfaces.IApplicantsContainer, JAMBBasedApplicantsContainer()) 57 ) 58 return 59 44 60 def suite(): 45 61 suite = unittest.TestSuite() 46 suite.addTests( 47 unittest.TestLoader().loadTestsFromTestCase( 48 ApplicantsContainerTestCase, 49 ) 50 ) 62 for test_case in [ 63 ApplicantsContainerTestCase, 64 JAMBBasedApplicantsContainerTestCase, 65 ]: 66 suite.addTests( 67 unittest.TestLoader().loadTestsFromTestCase(test_case)) 51 68 return suite 52 69
Note: See TracChangeset for help on using the changeset viewer.