Ignore:
Timestamp:
4 Apr 2014, 05:59:43 (11 years ago)
Author:
Henrik Bettermann
Message:

Multiple payments in special application containers enabled.
Special payment applicants remain in state started after payment.

File:
1 edited

Legend:

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

    r11253 r11575  
    943943        configuration.academic_session = session_1
    944944        configuration.transcript_fee = 200.0
     945        configuration.clearance_fee = 300.0
    945946        self.app['configuration'].addSessionConfiguration(configuration)
    946947
     
    974975        self.assertTrue(
    975976            '<span>200.0</span>' in self.browser.contents)
    976         self.browser.getLink("Logout").click()
    977         # Login as manager
    978         #self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
    979         #self.browser.open(applicant_path + '/manage')
    980         # When unselecting special_application, the payment ticket
    981         # can still be created.
    982         #self.browser.getControl(name="form.special_application").value = [
    983         #    '']
    984         #self.browser.getControl("Save").click()
    985         #self.browser.getControl("Add online payment ticket").click()
    986         #self.assertMatches('...Payment ticket created...',
    987         #                   self.browser.contents)
    988         #self.assertMatches('...<span>--</span>...',
    989         #                   self.browser.contents)
     977        self.assertEqual(len(self.special_applicant.keys()), 1)
     978        # The applicant's workflow remain started ...
     979        self.special_applicant.values()[0].approveApplicantPayment()
     980        self.assertEqual(self.special_applicant.state, 'started')
     981        self.browser.open(applicant_path + '/edit')
     982        # ... so that he can create further tickets.
     983        self.browser.getControl(name="form.special_application").value = [
     984            'clearance']
     985        self.browser.getControl("Save").click()
     986        self.browser.getControl("Add online payment ticket").click()
     987        self.assertMatches('...Payment ticket created...',
     988                           self.browser.contents)
     989        self.browser.open(applicant_path)
     990        self.assertTrue(
     991            '<td>Acceptance Fee</td>' in self.browser.contents)
     992        self.assertEqual(len(self.special_applicant.keys()), 2)
    990993        return
    991994
Note: See TracChangeset for help on using the changeset viewer.