Changeset 5867 for main/waeup.sirp/trunk/src/waeup/sirp
- Timestamp:
- 14 Mar 2011, 07:43:30 (14 years ago)
- Location:
- main/waeup.sirp/trunk/src/waeup/sirp/applicants
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/applicants/root.py
r5815 r5867 33 33 """ 34 34 grok.implements(IApplicantsRoot) 35 36 def addApplicantsContainer(self, container, name=None):37 """Add an applicants container.38 39 Adds an applicants container that implements `interface`40 under the name `name`.41 42 `container`43 the container instance to be added. Should44 implement :class:`IApplicantsContainer`.45 46 `name`47 the name under which the container will be accessible. We48 usually use names like ``pume_2011`` to indicate, that the49 new container will contain student applicants for a50 certain screening type (``pume``) and of the year 2011.51 52 """53 self[name] = container54 return55 35 56 36 class ApplicantsPlugin(grok.GlobalUtility): -
main/waeup.sirp/trunk/src/waeup/sirp/applicants/tests/test_root.py
r5814 r5867 57 57 return 58 58 59 def test_add_container(self):60 root = ApplicantsRoot()61 fake_container = object()62 root.addApplicantsContainer(fake_container, name='foo')63 self.assertTrue(root['foo'] == fake_container)64 return65 66 59 class ApplicantsRootPluginTestCase(unittest.TestCase): 67 60 def create_logger(self):
Note: See TracChangeset for help on using the changeset viewer.