Changeset 11611 for main/waeup.uniben/trunk/src/waeup/uniben/students
- Timestamp:
- 30 Apr 2014, 14:17:47 (11 years ago)
- Location:
- main/waeup.uniben/trunk/src/waeup/uniben/students
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.uniben/trunk/src/waeup/uniben/students/tests/test_browser.py
r11553 r11611 36 36 from waeup.uniben.testing import FunctionalLayer 37 37 38 SAMPLE_FPM = os.path.join(os.path.dirname(__file__), 'sample.fpm') 38 39 39 40 class StudentUITests(StudentsFullSetup): … … 745 746 self.assertTrue('zope.mgr - waeup.uniben.students.browser.CustomStudentActivatePage - ' 746 747 'B1000000 - account activated' in logcontent) 748 749 def test_manage_upload_fpm_file(self): 750 self.browser.addHeader('Authorization', 'Basic mgr:mgrpw') 751 self.browser.open(self.manage_clearance_path) 752 image = open(SAMPLE_FPM, 'rb') 753 ctrl = self.browser.getControl(name='leftthumbprintupload') 754 file_ctrl = ctrl.mech_control 755 file_ctrl.add_file(image, filename='thumbprint.fpm') 756 self.browser.getControl( 757 name='upload_leftthumbprintupload').click() 758 self.assertTrue( 759 'File finger1.fpm uploaded.' in self.browser.contents) 760 self.assertTrue( 761 'http://localhost/app/students/B1000000/finger1.fpm' 762 in self.browser.contents) 763 self.browser.getControl( 764 name='delete_leftthumbprintupload').click() 765 self.assertTrue( 766 'finger1.fpm deleted' 767 in self.browser.contents) -
main/waeup.uniben/trunk/src/waeup/uniben/students/viewlets.py
r11556 r11611 107 107 download_name = u'secr_cults' 108 108 109 class ResultStatementImage(Image):109 class SecrCultsStatementImage(Image): 110 110 """Renders Affidavit of Non-Membership of Secret Cults scan. 111 111 """ 112 112 grok.name('secr_cults') 113 113 download_name = u'secr_cults' 114 115 # Fingerprints 116 117 class LeftThumbPrintDisplay(FileDisplay): 118 """Left thumb fingerprint display viewlet. 119 """ 120 grok.order(21) 121 label = _(u'Left Thumb Fingerprint') 122 title = _(u'Left Thumb Fingerprint Minutiae') 123 download_name = u'finger1.fpm' 124 125 class LeftThumbPrintSlip(LeftThumbPrintDisplay): 126 """Mentions scanned fingerprint on slip. 127 128 Fingerprint minutiae is not printet. 129 """ 130 grok.view(ExportPDFClearanceSlipPage) 131 132 class LeftThumbPrintUpload(FileUpload): 133 """Left thumb fingerprint upload viewlet. 134 """ 135 grok.order(21) 136 label = _(u'Left Thumb Fingerprint') 137 title = _(u'Left Thumb Fingerprint Minutiae') 138 mus = 1024 * 5 139 download_name = u'finger1.fpm' 140 141 class LeftThumbPrintImage(Image): 142 """Renders left thumb fingerprint minutiae for download. 143 """ 144 grok.name('finger1.fpm') 145 download_name = u'finger1.fpm'
Note: See TracChangeset for help on using the changeset viewer.