Changeset 11568 for main/waeup.kofa/trunk/src/waeup/kofa/students
- Timestamp:
- 2 Apr 2014, 19:27:27 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py
r11535 r11568 620 620 self.browser.headers['content-type'], 'image/jpeg') 621 621 self.assertEqual(len(self.browser.contents), 2787) 622 # Reuploading a file which is bigger than 150k will raise an error622 # We can't reupload a file. The existing file must be deleted first. 623 623 self.browser.open(self.manage_clearance_path) 624 # An image > 150K 624 self.assertFalse( 625 'upload_birthcertificateupload' in self.browser.contents) 626 # File must be deleted first 627 self.browser.getControl(name='delete_birthcertificateupload').click() 628 self.assertTrue( 629 'birth_certificate deleted' in self.browser.contents) 630 # Uploading a file which is bigger than 150k will raise an error 625 631 big_image = StringIO(open(SAMPLE_IMAGE, 'rb').read() * 75) 626 632 ctrl = self.browser.getControl(name='birthcertificateupload') … … 642 648 # jpg file was recognized 643 649 'File birth_certificate.jpg uploaded.' in self.browser.contents) 650 # Delete file again 651 self.browser.getControl(name='delete_birthcertificateupload').click() 652 self.assertTrue( 653 'birth_certificate deleted' in self.browser.contents) 644 654 # File names must meet several conditions 645 655 bmp_image = open(SAMPLE_IMAGE_BMP, 'rb') … … 651 661 self.assertTrue('Only the following extensions are allowed' 652 662 in self.browser.contents) 653 # Managers can delete files654 self.browser.getControl(name='delete_birthcertificateupload').click()655 self.assertTrue(656 'birth_certificate deleted' in self.browser.contents)657 663 658 664 # Managers can upload a file via the StudentBaseManageFormPage
Note: See TracChangeset for help on using the changeset viewer.