Ignore:
Timestamp:
22 Apr 2013, 08:58:12 (12 years ago)
Author:
Henrik Bettermann
Message:

In the beginning the attr parameter was not taken into account for
Applicant context as the single passport image was the
only file we stored for applicants. Meanwhile FUTMinna requires
uploads of other documents too. Now we store passport image
files without attribute but all other documents with.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_applicant.py

    r9287 r10089  
    144144        return
    145145
     146    def test_name_chooser_applicant_nonpassport_w_container(self):
     147        fake_container = grok.Container()
     148        fake_container.__name__ = 'folder'
     149        fake_container.code = 'folder'
     150        appl = Applicant()
     151        appl.applicant_id = u'folder_123456'
     152        appl.__parent__ = fake_container
     153        chooser = IFileStoreNameChooser(appl)
     154        result = chooser.chooseName(attr='any.pdf')
     155        self.assertEqual(
     156            result, '__img-applicant__folder/%s_any.pdf' % appl.applicant_id)
     157        return
     158
    146159    def test_name_chooser_check_name(self):
    147160        # we can check file ids for applicants
Note: See TracChangeset for help on using the changeset viewer.