Changeset 11729 for main/waeup.kofa/trunk
- Timestamp:
- 3 Jul 2014, 09:04:34 (10 years ago)
- Location:
- main/waeup.kofa/trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/CHANGES.txt
r11726 r11729 5 5 =================== 6 6 7 * Option for additional passport upload requirements added. 7 * Application payment slips can only be downloaded if application form is 8 submitted. 9 10 * Method for additional passport upload requirements added. 8 11 9 12 * Remove unused rowadd javascript function. -
main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser.py
r11727 r11729 739 739 740 740 def render(self): 741 if self.context.__parent__.special \ 742 and self.context.__parent__.state != SUBMITTED: 741 if self.context.__parent__.state != SUBMITTED: 743 742 self.flash(_('Please submit the application form before ' 744 743 'trying to download payment slips.'), type='warning') -
main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_browser.py
r11601 r11729 847 847 # We approve the payment by bypassing the view 848 848 payment.approve() 849 # The payment slip can be downloaded now850 self.browser.open(payment_url)851 self.browser.getLink("Download payment slip").click()852 self.assertEqual(self.browser.headers['Status'], '200 Ok')853 self.assertEqual(self.browser.headers['Content-Type'],854 'application/pdf')855 849 # Applicant is is not yet in state 'paid' because it was only 856 850 # the payment which we set to paid … … 890 884 % (self.applicant.applicant_id, payment.p_id) 891 885 in logcontent) 886 # Payment slips can't be downloaded ... 887 payment_id = self.applicant.keys()[0] 888 self.browser.open(self.view_path + '/' + payment_id) 889 self.browser.getLink("Download payment slip").click() 890 self.assertTrue( 891 'Please submit the application form before trying to download payment slips.' 892 in self.browser.contents) 893 # ... unless form is submitted. 894 self.browser.open(self.view_path + '/edit') 895 image = open(SAMPLE_IMAGE, 'rb') 896 ctrl = self.browser.getControl(name='form.passport') 897 file_ctrl = ctrl.mech_control 898 file_ctrl.add_file(image, filename='myphoto.jpg') 899 self.browser.getControl(name="confirm_passport").value = True 900 self.browser.getControl("Final Submit").click() 901 self.browser.open(self.view_path + '/' + payment_id) 902 self.browser.getLink("Download payment slip").click() 903 self.assertEqual(self.browser.headers['Content-Type'], 904 'application/pdf') 892 905 return 893 906
Note: See TracChangeset for help on using the changeset viewer.