Changeset 9238 for main/waeup.kofa/trunk/src/waeup/kofa
- Timestamp:
- 27 Sep 2012, 06:48:04 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py
r9235 r9238 607 607 self.assertTrue( 608 608 'birth_certificate deleted' in self.browser.contents) 609 # Managers can add and delete second file 610 self.browser.open(self.manage_clearance_path) 611 image = open(SAMPLE_IMAGE, 'rb') 612 ctrl = self.browser.getControl(name='birthcertificateupload') 613 file_ctrl = ctrl.mech_control 614 file_ctrl.add_file(image, filename='my_acceptance_letter.jpg') 615 self.browser.getControl( 616 name='upload_acceptanceletterupload').click() 617 self.assertFalse( 618 '<a target="image" href="acc_let">' 619 in self.browser.contents) 620 ctrl = self.browser.getControl(name='acceptanceletterupload') 621 file_ctrl = ctrl.mech_control 622 image.seek(0) 623 file_ctrl.add_file(image, filename='my_acceptance_letter.jpg') 624 self.browser.getControl( 625 name='upload_acceptanceletterupload').click() 626 self.assertTrue( 627 '<a target="image" href="acc_let">' 628 in self.browser.contents) 629 self.browser.getControl( 630 name='delete_acceptanceletterupload').click() 631 self.assertTrue( 632 'acc_let deleted' 633 in self.browser.contents) 609 634 610 # Managers can upload a file via the StudentBaseManageFormPage 635 611 self.browser.open(self.manage_student_path)
Note: See TracChangeset for help on using the changeset viewer.