Ignore:
Timestamp:
30 Apr 2014, 14:17:47 (11 years ago)
Author:
Henrik Bettermann
Message:

Add viewlets for left thumb fingerprint minutiae file uploads.

Location:
main/waeup.uniben/trunk/src/waeup/uniben/students/tests
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.uniben/trunk/src/waeup/uniben/students/tests/test_browser.py

    r11553 r11611  
    3636from waeup.uniben.testing import FunctionalLayer
    3737
     38SAMPLE_FPM = os.path.join(os.path.dirname(__file__), 'sample.fpm')
    3839
    3940class StudentUITests(StudentsFullSetup):
     
    745746        self.assertTrue('zope.mgr - waeup.uniben.students.browser.CustomStudentActivatePage - '
    746747                        '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)
Note: See TracChangeset for help on using the changeset viewer.