Ignore:
Timestamp:
20 Jan 2020, 17:23:31 (5 years ago)
Author:
Henrik Bettermann
Message:

Rename stateresult file and adjust to base package.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/applicants/tests/test_browser.py

    r15878 r15942  
    102102        print "Sample application_slip.pdf written to %s" % path
    103103
    104     def test_upload_stateresult_by_manager(self):
     104    def test_upload_res_stat_by_manager(self):
    105105        # Add trans applicants container
    106106        self.transcontainer = ApplicantsContainer()
     
    134134        pdf_content = 'A' * 1024 * 300  # A string of 300 KB size
    135135        pseudo_pdf = StringIO(pdf_content)
    136         ctrl = self.browser.getControl(name='form.stateresult')
     136        ctrl = self.browser.getControl(name='form.res_stat')
    137137        file_ctrl = ctrl.mech_control
    138138        file_ctrl.add_file(pseudo_pdf, filename='myform.pdf')
     
    141141        self.assertTrue('Required input is missing' in self.browser.contents)
    142142        # ... the file has been successfully uploaded
    143         pdf_url = self.transapplicant_manage_path.replace('manage', 'stateresult.pdf')
     143        pdf_url = self.transapplicant_manage_path.replace('manage', 'res_stat.pdf')
    144144        self.browser.open(pdf_url)
    145145        self.assertEqual(
     
    149149        storage = getUtility(IExtFileStore)
    150150        file_id = IFileStoreNameChooser(self.transapplicant).chooseName(
    151             attr='stateresult.pdf')
     151            attr='res_stat.pdf')
    152152        # The stored file can be fetched
    153153        fd = storage.getFile(file_id)
     
    156156        # A file link is displayed on the edit view ...
    157157        self.browser.open(self.transapplicant_manage_path)
    158         self.assertTrue('<a href="stateresult.pdf">' in self.browser.contents)
     158        self.assertTrue('<a href="res_stat.pdf">' in self.browser.contents)
    159159        # ... and on the dislay view
    160160        self.browser.open(self.transapplicant_view_path)
    161         self.assertTrue('stateresult.pdf">Statement of Result</a>'
     161        self.assertTrue('res_stat.pdf">Statement of Result</a>'
    162162            in self.browser.contents)
    163163        # Adding file is properly logged
     
    167167        self.assertTrue(
    168168            'zope.mgr - kofacustom.iuokada.applicants.browser.CustomApplicantManageFormPage'
    169             ' - %s - saved: stateresult'
     169            ' - %s - saved: res_stat'
    170170            % (self.transapplicant.applicant_id)
    171171            in logcontent)
Note: See TracChangeset for help on using the changeset viewer.