Ignore:
Timestamp:
4 Oct 2012, 09:32:39 (12 years ago)
Author:
Henrik Bettermann
Message:

Configure interswitch module for student payments.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.futminna/trunk/src/waeup/futminna/interswitch/tests.py

    r9155 r9285  
    5151        self.browser.open(self.payments_path + '/addop')
    5252        self.browser.getControl("Create ticket").click()
    53         self.assertMatches('...Payment components not yet configured...',
     53        self.assertMatches('...Payment ticket created...',
    5454                           self.browser.contents)
    55 
    56 
    57 class InterswitchTestsApplicants(ApplicantsFullSetup):
    58     """Tests for the Interswitch payment gateway.
    59     """
    60 
    61     layer = FunctionalLayer
    62 
    63     def setUp(self):
    64         super(InterswitchTestsApplicants, self).setUp()
    65         self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
    66         self.browser.open(self.manage_path)
    67         #IWorkflowState(self.student).setState('started')
    68         super(InterswitchTestsApplicants, self).fill_correct_values()
    69         self.applicantscontainer.application_fee = 1000.0
    70         self.browser.getControl(name="transition").value = ['start']
    71         self.browser.getControl("Save").click()
    72         self.browser.getControl("Add online").click()
    73         self.assertMatches('...ticket created...',
    74                            self.browser.contents)
    75         #ctrl = self.browser.getControl(name='val_id')
    76         #value = ctrl.options[0]
    77         #self.browser.getLink(value).click()
     55        ctrl = self.browser.getControl(name='val_id')
     56        value = ctrl.options[0]
     57        self.browser.getLink(value).click()
    7858        self.assertMatches('...Amount Authorized...',
    7959                           self.browser.contents)
    8060        self.assertMatches(
    81             '...<span>1000.0</span>...',
     61            '...<span>131500.0</span>...',
    8262            self.browser.contents)
    8363        self.payment_url = self.browser.url
    84 
    8564
    8665    def test_interswitch_form(self):
     
    9170                           self.browser.contents)
    9271        self.assertMatches(
    93             '...<input type="hidden" name="amount" value="100000.0" />...',
     72            '...<input type="hidden" name="amount" value="13150000.0" />...',
    9473            self.browser.contents)
    9574
    9675    @external_test
    9776    def test_webservice(self):
    98 
    9977        self.browser.open(self.payment_url + '/request_webservice')
    10078        self.assertMatches('...Unsuccessful callback...',
Note: See TracChangeset for help on using the changeset viewer.