Changeset 6941 for main/waeup.sirp/trunk


Ignore:
Timestamp:
25 Oct 2011, 09:02:31 (13 years ago)
Author:
Henrik Bettermann
Message:

Add tests for school fee payments.

File:
1 edited

Legend:

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

    r6940 r6941  
    696696        self.browser.getLink(value).click()
    697697        self.browser.open(self.browser.url + '/callback')
     698        self.assertMatches('...Valid callback received...',
     699                          self.browser.contents)
    698700        expected = '''...
    699701        <td>
     
    717719                           self.browser.contents)
    718720
     721        # Managers can add online schoolfee payment tickets
     722        self.browser.open(self.payments_student_path + '/addop')
     723        self.browser.getControl(name="form.p_category").value = ['schoolfee']
     724        self.browser.getControl("Create ticket").click()
     725        self.assertMatches('...ticket created...',
     726                           self.browser.contents)
     727
     728        # Managers can open the callback view which simulates a valid callback
     729        self.assertEqual(len(self.app['accesscodes']['SFE-0']),0)
     730        ctrl = self.browser.getControl(name='val_id')
     731        value = ctrl.options[0]
     732        self.browser.getLink(value).click()
     733        self.browser.open(self.browser.url + '/callback')
     734        self.assertMatches('...Valid callback received...',
     735                          self.browser.contents)
Note: See TracChangeset for help on using the changeset viewer.