Changeset 14952 for main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests
- Timestamp:
- 9 Feb 2018, 19:52:16 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.