Changeset 15042 for main/waeup.kofa/trunk/src/waeup/kofa/students/tests
- Timestamp:
- 6 Jun 2018, 11:10:07 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py
r14992 r15042 42 42 from waeup.kofa.app import University 43 43 from waeup.kofa.payments.interfaces import IPayer 44 from waeup.kofa.students.payments import StudentOnlinePayment 44 45 from waeup.kofa.students.student import Student 45 46 from waeup.kofa.students.studylevel import StudentStudyLevel … … 58 59 URL_LECTURER_LANDING = 'http://localhost/app/my_courses' 59 60 61 curr_year = datetime.now().year 60 62 61 63 def lookup_submit_value(name, value, browser): … … 3484 3486 return job_id 3485 3487 3488 def add_payment(self, student): 3489 # get a payment with all fields set 3490 payment = StudentOnlinePayment() 3491 payment.creation_date = datetime(2012, 12, 13) 3492 payment.p_id = 'my-id' 3493 payment.p_category = u'schoolfee' 3494 payment.p_state = 'paid' 3495 payment.ac = u'666' 3496 payment.p_item = u'p-item' 3497 payment.p_level = 100 3498 payment.p_session = curr_year - 6 3499 payment.payment_date = datetime(2012, 12, 13) 3500 payment.amount_auth = 12.12 3501 payment.r_amount_approved = 12.12 3502 payment.r_code = u'r-code' 3503 # XXX: there is no addPayment method to give predictable names 3504 self.payment = student['payments']['my-payment'] = payment 3505 return payment 3506 3486 3507 def test_datacenter_export(self): 3487 3508 self.browser.addHeader('Authorization', 'Basic mgr:mgrpw') … … 3518 3539 'zope.mgr - students.browser.DatacenterExportJobContainerJobConfig ' 3519 3540 '- exported: bursary (2004, 100, ug_ft, None, None, None, ' 3520 '13/12/2012, 14/12/2012 ), job_id=%s'3541 '13/12/2012, 14/12/2012, all, all, all), job_id=%s' 3521 3542 % job_id in logcontent 3522 3543 ) … … 3572 3593 3573 3594 def test_faculties_export(self): 3595 self.add_payment(self.student) 3574 3596 self.browser.addHeader('Authorization', 'Basic mgr:mgrpw') 3575 3597 facs_path = 'http://localhost/app/faculties' … … 3583 3605 self.browser.getControl(name="payments_start").value = '13/12/2012' 3584 3606 self.browser.getControl(name="payments_end").value = '14/12/2012' 3607 self.browser.getControl(name="paycat").value = ['schoolfee'] 3585 3608 self.browser.getControl("Create CSV file").click() 3586 3609 … … 3595 3618 'filename="WAeUP.Kofa_bursary_%s.csv' % job_id in 3596 3619 self.browser.headers['content-disposition']) 3620 self.assertTrue( 3621 '666,12.12,2012-12-13 00:00:00#,schoolfee,1,my-id,p-item,100,2012,' 3622 'paid,2012-12-13 00:00:00#,12.12,r-code,,K1000000,234,123,Anna,,' 3623 'Tester,created,2004,2004,,fac1,dep1,CERT1' in self.browser.contents) 3597 3624 self.assertEqual(len(self.app['datacenter'].running_exports), 1) 3598 3625 job_id = self.app['datacenter'].running_exports[0][0] … … 3608 3635 'zope.mgr - students.browser.FacultiesExportJobContainerJobConfig ' 3609 3636 '- exported: bursary (2004, 100, ug_ft, None, None, None, ' 3610 '13/12/2012, 14/12/2012 ), job_id=%s'3637 '13/12/2012, 14/12/2012, all, all, schoolfee), job_id=%s' 3611 3638 % job_id in logcontent 3612 3639 ) … … 3669 3696 'zope.mgr - students.browser.FacultyExportJobContainerJobConfig ' 3670 3697 '- exported: students (2004, 100, ug_ft, fac1, None, None, ' 3671 '13/12/2012, 14/12/2012 ), job_id=%s'3698 '13/12/2012, 14/12/2012, all, all, all), job_id=%s' 3672 3699 % job_id in logcontent 3673 3700 ) … … 3721 3748 'zope.mgr - students.browser.DepartmentExportJobContainerJobConfig ' 3722 3749 '- exported: students (2004, 100, ug_ft, None, dep1, None, ' 3723 '13/12/2012, 14/12/2012 ), job_id=%s'3750 '13/12/2012, 14/12/2012, all, all, all), job_id=%s' 3724 3751 % job_id in logcontent 3725 3752 ) … … 3767 3794 self.assertTrue( 3768 3795 'zope.mgr - students.browser.CertificateExportJobContainerJobConfig ' 3769 '- exported: students (2004, 100, None, None, None, CERT1, None, None), ' 3796 '- exported: students ' 3797 '(2004, 100, None, None, None, CERT1, , , None, None, None), ' 3770 3798 'job_id=%s' 3771 3799 % job_id in logcontent
Note: See TracChangeset for help on using the changeset viewer.