Changeset 7260 for main/waeup.sirp/trunk/src/waeup/sirp/applicants/tests
- Timestamp:
- 4 Dec 2011, 07:56:39 (13 years ago)
- Location:
- main/waeup.sirp/trunk/src/waeup/sirp/applicants/tests
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/applicants/tests/test_applicant.py
r7255 r7260 123 123 # we can get an image filename for applicants not in a container 124 124 appl = Applicant() 125 appl.applicant_id = u'dummy_123456' 125 126 chooser = IFileStoreNameChooser(appl) 126 127 result = chooser.chooseName() 127 128 # the file would be stored in a ``_default`` directory. 128 129 self.assertEqual( 129 result, '__img-applicant___default/ xxx_1234.jpg')130 result, '__img-applicant___default/dummy_123456.jpg') 130 131 return 131 132 … … 134 135 fake_container.__name__ = 'folder' 135 136 fake_container.code = 'folder' 136 appl = Applicant(container=fake_container) 137 appl = Applicant() 138 appl.applicant_id = u'folder_123456' 137 139 appl.__parent__ = fake_container 138 140 chooser = IFileStoreNameChooser(appl) … … 147 149 fake_container.__name__ = 'folder' 148 150 fake_container.code = 'folder' 149 appl = Applicant(container=fake_container) 151 appl = Applicant() 152 appl.applicant_id = u'folder_123456' 150 153 appl.__parent__ = fake_container 151 154 chooser = IFileStoreNameChooser(appl) … … 193 196 194 197 def test_factory(self): 195 obj = self.factory( container=None)198 obj = self.factory() 196 199 assert isinstance(obj, Applicant) 197 200 -
main/waeup.sirp/trunk/src/waeup/sirp/applicants/tests/test_browser.py
r7259 r7260 117 117 118 118 # Add an applicant 119 self.applicant = Applicant(container=applicantscontainer) 120 app['applicants']['app2009'][ 121 self.applicant.application_number] = self.applicant 119 self.applicant = Applicant() 120 app['applicants']['app2009'].addApplicant(self.applicant) 122 121 IUserAccount( 123 122 self.app['applicants']['app2009'][ -
main/waeup.sirp/trunk/src/waeup/sirp/applicants/tests/test_catalog.py
r7240 r7260 61 61 setSite(self.app) 62 62 self.app['applicants']['mystuff'] = self.container 63 self.applicant = Applicant(container=self.container) 64 self.app['applicants']['mystuff'][ 65 self.applicant.application_number] = self.applicant 63 self.applicant = Applicant() 64 self.app['applicants']['mystuff'].addApplicant(self.applicant) 66 65 return 67 66
Note: See TracChangeset for help on using the changeset viewer.