Changeset 13968 for main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests
- Timestamp:
- 22 Jun 2016, 04:39:50 (9 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_applicant.py
r13216 r13968 34 34 ) 35 35 from waeup.kofa.applicants.interfaces import IApplicant 36 from waeup.kofa.applicants.payment import ApplicantOnlinePayment 36 37 from waeup.kofa.testing import FunctionalTestCase, FunctionalLayer 37 38 … … 205 206 return 206 207 208 def test_payments(self): 209 payment = ApplicantOnlinePayment() 210 no_payment = object() 211 self.applicant['pid'] = payment 212 self.applicant['nopid'] = no_payment 213 self.assertEqual(len(self.applicant.values()),2) 214 self.assertEqual(len(self.applicant.payments),1) 215 self.assertEqual(self.applicant.payments[0],payment) 216 return 217 207 218 class ApplicantFactoryTest(FunctionalTestCase): 208 219 -
main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_browser.py
r13951 r13968 1079 1079 self.assertEqual(len(self.special_applicant.keys()), 1) 1080 1080 # The applicant's workflow state is paid ... 1081 self.special_applicant. values()[0].approveApplicantPayment()1081 self.special_applicant.payments[0].approveApplicantPayment() 1082 1082 self.assertEqual(self.special_applicant.state, 'paid') 1083 1083 self.browser.open(applicant_path + '/edit') … … 1094 1094 self.assertEqual(len(self.special_applicant.keys()), 2) 1095 1095 # Second payment can also be approved wthout error message 1096 flashtype, msg, log = self.special_applicant. values()[1].approveApplicantPayment()1096 flashtype, msg, log = self.special_applicant.payments[1].approveApplicantPayment() 1097 1097 self.assertEqual(flashtype, 'success') 1098 1098 self.assertEqual(msg, 'Payment approved') -
main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_export.py
r13952 r13968 283 283 applicant = self.setup_applicant(self.applicant) 284 284 exporter = ApplicantPaymentExporter() 285 exporter.export(applicant. values(), self.outfile)285 exporter.export(applicant.payments, self.outfile) 286 286 result = open(self.outfile, 'rb').read() 287 287 cdate = str('%s#' % self.applicant['p120'].creation_date)
Note: See TracChangeset for help on using the changeset viewer.