Changeset 9155 for main/waeup.futminna/trunk/src/waeup/futminna/interswitch
- Timestamp:
- 4 Sep 2012, 07:09:29 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.futminna/trunk/src/waeup/futminna/interswitch/tests.py
r8619 r9155 51 51 self.browser.open(self.payments_path + '/addop') 52 52 self.browser.getControl("Create ticket").click() 53 self.assertMatches('... ticket created...',53 self.assertMatches('...Payment components not yet configured...', 54 54 self.browser.contents) 55 ctrl = self.browser.getControl(name='val_id')56 value = ctrl.options[0]57 self.browser.getLink(value).click()58 self.assertMatches('...Amount Authorized...',59 self.browser.contents)60 self.assertMatches(61 '...<span>40000.0</span>...',62 self.browser.contents)63 self.payment_url = self.browser.url64 55 65 66 # def callback_url(self, payment_url, resp, apprAmt):67 # return payment_url + (68 # '/isw_callback?echo=' +69 # '&resp=%s' +70 # '&desc=Something went wrong' +71 # '&txnRef=p1331792385335' +72 # '&payRef=' + '&retRef=' +73 # '&cardNum=0' +74 # '&apprAmt=%s' +75 # '&url=http://xyz') % (resp, apprAmt)76 77 def test_interswitch_form(self):78 79 # Manager can access InterswitchForm80 self.browser.getLink("CollegePAY", index=0).click()81 self.assertMatches('...Total Amount Authorized:...',82 self.browser.contents)83 # The total amount to be processed by Interswitch84 # has been reduced by the Interswitch fee of 150 Nairas85 self.assertMatches(86 '...<input type="hidden" name="amount" value="4000000.0" />...',87 self.browser.contents)88 89 # @external_test90 # def test_callback(self):91 92 # Manager can call callback manually93 # self.browser.open(self.callback_url(self.payment_url, 'XX', '300'))94 # self.assertMatches('...Unsuccessful callback: Something went wrong...',95 # self.browser.contents)96 # self.assertMatches('...Failed...',97 # self.browser.contents)98 # self.browser.open(self.payment_url + '/isw_callback')99 # self.assertMatches('...Unsuccessful callback: Incomplete query string...',100 # self.browser.contents)101 # self.assertMatches('...Failed...',102 # self.browser.contents)103 # self.browser.open(self.callback_url(self.payment_url, '00', '300000'))104 # self.assertMatches('...Wrong amount...',105 # self.browser.contents)106 # self.browser.open(self.callback_url(self.payment_url, '00', '4000000'))107 # self.assertMatches('...Valid callback received...',108 # self.browser.contents)109 110 @external_test111 def test_webservice(self):112 113 self.browser.open(self.payment_url + '/request_webservice')114 self.assertMatches('...Unsuccessful callback...',115 self.browser.contents)116 # The payment is now in state failed117 self.assertMatches('...<span>Failed</span>...',118 self.browser.contents)119 56 120 57 class InterswitchTestsApplicants(ApplicantsFullSetup):
Note: See TracChangeset for help on using the changeset viewer.