Ignore:
Timestamp:
2 Aug 2024, 19:10:34 (5 months ago)
Author:
Henrik Bettermann
Message:

Implement Final Year Clearance Routing Slip upload (not active in base package).

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

Legend:

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

    r17650 r17867  
    6060
    6161SAMPLE_IMAGE = os.path.join(os.path.dirname(__file__), 'test_image.jpg')
     62SAMPLE_PDF = os.path.join(os.path.dirname(__file__), 'test_pdf.pdf')
    6263SAMPLE_IMAGE_BMP = os.path.join(os.path.dirname(__file__), 'test_image.bmp')
    6364URL_LECTURER_LANDING = 'http://localhost/app/my_courses'
     
    711712        self.assertTrue(
    712713            'src="http://localhost/app/students/K1000000/signature.jpg"'
     714            in self.browser.contents)
     715        ctrl = self.browser.getControl(name='finalclearanceuploadmanage')
     716        file_obj = open(SAMPLE_PDF, 'rb')
     717        file_ctrl = ctrl.mech_control
     718        file_ctrl.add_file(file_obj, filename='routing_slip.pdf')
     719        self.browser.getControl(
     720            name='upload_finalclearanceuploadmanage').click()
     721        self.assertTrue(
     722            'href="http://localhost/app/students/K1000000/routingslip"'
    713723            in self.browser.contents)
    714724        return
Note: See TracChangeset for help on using the changeset viewer.