Changeset 14579 for main/waeup.aaue
- Timestamp:
- 23 Feb 2017, 17:57:10 (8 years ago)
- Location:
- main/waeup.aaue/trunk/src/waeup/aaue/applicants
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaue/trunk/src/waeup/aaue/applicants/browser.py
r14486 r14579 469 469 return 470 470 471 @property 472 def _postfix(self): 473 """Alumni records have to be imported into several containers. 474 Therefore a string must be added to their registration number 475 to make it unique. 476 """ 477 if self.context.prefix in ('trans', 'cert'): 478 return self.context.code 479 return '' 480 471 481 class CustomExportPDFPaymentSlipPage(NigeriaExportPDFPaymentSlipPage): 472 482 -
main/waeup.aaue/trunk/src/waeup/aaue/applicants/tests/test_browser.py
r14486 r14579 143 143 self.assertTrue("Dispatch Address" in self.browser.contents) 144 144 145 def test_certificate_request_manage(self):145 def _prepare_cert_container(self): 146 146 # Add cert applicants container 147 147 self.certcontainer = ApplicantsContainer() 148 self.certcontainer.mode = ' create'148 self.certcontainer.mode = 'update' 149 149 self.certcontainer.code = u'cert%s' % session_1 150 150 self.certcontainer.prefix = u'cert' … … 161 161 certapplicant.firstname = u'Anna' 162 162 certapplicant.lastname = u'Post' 163 certapplicant.reg_number = u'1234%s' % self.certcontainer.code 163 164 self.app['applicants'][self.certcontainer.code].addApplicant(certapplicant) 164 165 self.certapplication_number = certapplicant.application_number 165 166 self.certapplicant = self.app['applicants'][self.certcontainer.code][ 166 167 self.certapplication_number] 168 self.certcontainer_path = ('http://localhost/app/applicants/cert%s' 169 % session_1) 167 170 self.certapplicant_path = ('http://localhost/app/applicants/cert%s/%s' 168 171 % (session_1, self.certapplication_number)) 172 173 def test_certificate_request_manage(self): 174 self._prepare_cert_container() 169 175 self.browser.addHeader('Authorization', 'Basic mgr:mgrpw') 170 176 self.browser.open(self.certapplicant_path) 171 177 self.assertEqual(self.browser.headers['Status'], '200 Ok') 172 178 self.assertTrue("Dispatch Address" in self.browser.contents) 179 180 def test_certificate_request_update(self): 181 self._prepare_cert_container() 182 #IWorkflowState(self.applicant).setState('initialized') 183 self.browser.open(self.certcontainer_path + '/register') 184 self.browser.getControl(name="form.lastname").value = 'post' 185 self.browser.getControl(name="form.reg_number").value = '1234' 186 self.browser.getControl(name="form.email").value = 'new@yy.zz' 187 self.browser.getControl("Send login credentials").click() 188 # Yeah, we succeded ... 189 self.assertTrue('Your registration was successful.' 190 in self.browser.contents) 173 191 174 192 def test_pg_application_manage(self):
Note: See TracChangeset for help on using the changeset viewer.