Ignore:
Timestamp:
13 Nov 2011, 20:13:07 (13 years ago)
Author:
Henrik Bettermann
Message:

Second trial:

Check file name extension of original filename and compare with expected extension taken from the download_name attribute of the respective file upload viewlet. The download_name attribute is also handed over as attr parameter in chooseName and in getFileByContext.

chooseName separates attr into the base filename and the extension.

download_name = u'nice_image.abc'
File storage path: students/A/A123456/nice_image_A123456.abc

StudentFileNameChooser? itself does not require any special file extension. The extension is given by the upload and display viewlets.

(Tests will follow)

File:
1 edited

Legend:

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

    r7101 r7106  
    393393        self.browser.getControl("Save").click() # submit form
    394394        self.assertTrue(
    395             'Uploaded image is too big' in self.browser.contents)
     395            'Uploaded file is too big' in self.browser.contents)
    396396
    397397    def test_manage_course_lists(self):
Note: See TracChangeset for help on using the changeset viewer.