Ignore:
Timestamp:
13 Apr 2021, 10:32:16 (4 years ago)
Author:
Henrik Bettermann
Message:

Students must upload new passport picture before requesting clearance.

File:
1 edited

Legend:

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

    r16447 r16456  
    4545
    4646SAMPLE_FPM = os.path.join(os.path.dirname(__file__), 'sample.fpm')
    47 SAMPLE_IMAGE = os.path.join(os.path.dirname(__file__), 'test_image.jpg')
     47SAMPLE_PASSPORT = os.path.join(os.path.dirname(__file__), 'test_image.jpg')
    4848
    4949class OfficerUITests(StudentsFullSetup):
     
    157157        # have been uploaded.
    158158        self.browser.getControl("Save and request clearance").click()
     159
     160        self.assertTrue('No red background passport picture uploaded'
     161            in self.browser.contents)
     162        passport = 'My passport picture'
     163        file_id = IFileStoreNameChooser(self.student).chooseName(
     164            attr="passport.jpg")
     165        image = open(SAMPLE_PASSPORT, 'rb')
     166        file_store.createFile(file_id, image)
     167        self.browser.open(self.edit_clearance_path)
     168        self.browser.getControl("Save and request clearance").click()
     169
    159170        self.assertTrue('No birth certificate uploaded'
    160171            in self.browser.contents)
Note: See TracChangeset for help on using the changeset viewer.