Changeset 14952 for main/waeup.kofa/trunk/src/waeup
- Timestamp:
- 9 Feb 2018, 19:52:16 (7 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/applicants
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser.py
r14951 r14952 721 721 ob_class = self.__implemented__.__name__.replace( 722 722 'waeup.kofa.','') 723 applicants_root.logger.info(724 '%s - %s - %s' % (ob_class, result.applicant_id, msg))725 726 723 grok.getSite()['configuration'].maintmode_enabled_by = None 727 724 self.successful = ', '.join(created) -
main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser_templates/createallstudentspage.pt
r14951 r14952 1 1 <div i18n:domain="waeup.kofa"> 2 <strong i18n:translate="">Successfully created records:</strong> 3 <br /> 4 <div tal:replace="structure view/successful"> 5 </div> 6 <br /> 7 <strong i18n:translate="">Failed records:</strong> 8 <br /> 9 <div tal:repeat="value view/failed"> 10 <a tal:attributes="href python:value[1]" tal:content="python:value[0]"> ID</a> 11 (<span tal:content="python:value[2]">MSG</span>) 12 </div> 2 <tal:success condition="view/successful"> 3 <strong i18n:translate="">Successfully created records:</strong> 4 <br /> 5 <div tal:replace="structure view/successful"> 6 </div> 7 <br /> 8 </tal:success> 9 <tal:fail condition="view/failed"> 10 <strong i18n:translate="">Failed records:</strong> 11 <br /> 12 <div tal:repeat="value view/failed"> 13 <a tal:attributes="href python:value[1]" tal:content="python:value[0]"> ID</a> 14 (<span tal:content="python:value[2]">MSG</span>) 15 </div> 16 </tal:fail> 17 <tal:norecord i18n:translate="" 18 condition="python:not view.failed and not view.successful"> 19 No record found. 20 </tal:norecord> 13 21 </div> -
main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_applicantcopier.py
r14949 r14952 161 161 self.browser.open(self.container_path + '/createallstudents') 162 162 self.assertTrue('No record found' in self.browser.contents) 163 self.assertFalse('Failed records' in self.browser.contents) 164 self.assertFalse('Successfully created records' in self.browser.contents) 163 165 IWorkflowState(self.applicant).setState('admitted') 164 166 notify(grok.ObjectModifiedEvent(self.applicant)) 165 167 self.browser.open(self.container_path + '/createallstudents') 166 168 self.assertTrue('No course admitted provided' in self.browser.contents) 167 logcontent = open(logfile).read()168 self.assertTrue(' No course admitted provided' in logcontent)169 self.assertFalse('Successfully created records' in self.browser.contents) 170 self.assertTrue('Failed records' in self.browser.contents) 169 171 self.browser.open(self.manage_path) 170 172 self.browser.getControl(name="form.course_admitted").value = ['CERT1'] … … 174 176 self.browser.open(self.container_path + '/createallstudents') 175 177 self.assertTrue('RequiredMissing: date_of_birth' in self.browser.contents) 176 logcontent = open(logfile).read()177 self.assert True('RequiredMissing: date_of_birth' in logcontent)178 self.assertTrue('Failed records' in self.browser.contents) 179 self.assertFalse('Successfully created records' in self.browser.contents) 178 180 self.browser.open(self.manage_path) 179 181 self.browser.getControl(name="form.date_of_birth").value = '09/09/1988' 180 182 self.browser.getControl("Save").click() 181 183 self.browser.open(self.container_path + '/createallstudents') 182 self.assertTrue('1 students successfully created' in self.browser.contents) 184 self.assertFalse('Failed records' in self.browser.contents) 185 self.assertTrue('Successfully created records' in self.browser.contents) 183 186 184 187 def test_hidden_batch_copying_all(self): … … 195 198 self.browser.open(self.root_path + '/createallstudents') 196 199 self.assertTrue('No course admitted provided' in self.browser.contents) 197 logcontent = open(logfile).read()198 self.assertTrue('No course admitted provided' in logcontent)199 200 self.applicant.course_admitted = self.certificate 200 201 self.browser.open(self.root_path + '/createallstudents') 201 self.assertTrue(' 1 students successfully created' in self.browser.contents)202 self.assertTrue('Successfully created records:' in self.browser.contents) 202 203 203 204 def test_copier_wo_passport(self): … … 241 242 'IOError: Application Slip could not be created.' 242 243 in self.browser.contents) 243 logfile = os.path.join(244 self.app['datacenter'].storage, 'logs', 'applicants.log')245 logcontent = open(logfile).read()246 self.assertTrue(247 'IOError: Application Slip could not be created.' in logcontent)248 244 249 245 def disabled_test_delay(self):
Note: See TracChangeset for help on using the changeset viewer.