- Timestamp:
- 22 Oct 2012, 16:29:57 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.uniben/trunk/src/waeup/uniben/interswitch/tests.py
r9385 r9389 16 16 ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 17 ## 18 from zope.component import createObject 18 19 from hurry.workflow.interfaces import IWorkflowState 19 20 from waeup.kofa.students.tests.test_browser import StudentsFullSetup … … 53 54 self.browser.getControl(name="form.p_category").value = ['schoolfee'] 54 55 self.browser.getControl("Create ticket").click() 55 self.assertMatches('...ticket created...',56 self.browser.contents)57 ctrl = self.browser.getControl(name='val_id')58 value = ctrl.options[0]59 self.browser.getLink(value).click()60 56 61 57 … … 74 70 75 71 # School fee ticket already created in setUp method 72 self.assertMatches('...ticket created...', 73 self.browser.contents) 74 ctrl = self.browser.getControl(name='val_id') 75 value = ctrl.options[0] 76 self.browser.getLink(value).click() 76 77 self.assertMatches('...Amount Authorized...', 77 78 self.browser.contents) … … 82 83 # Manager can access InterswitchForm 83 84 self.browser.getLink("CollegePAY", index=0).click() 84 self.assertMatches('...Total Amount Authorized:...',85 self.browser.contents)86 85 # The total amount to be processed by Interswitch 87 86 # has been reduced by the Interswitch fee of 150 Nairas 87 self.assertMatches('...<input type="hidden" name="pay_item_id" value="5700" />...', 88 self.browser.contents) 88 89 self.assertMatches('...Total Amount Authorized:...', 89 90 self.browser.contents) … … 93 94 self.assertMatches( 94 95 '...item_name="School Fee" item_amt="3835000" bank_id="00" acct_num="000000000000"...', 96 self.browser.contents) 97 self.assertMatches( 98 '...item_name="BT Education" item_amt="150000" bank_id="117" acct_num="1010764827"...', 99 self.browser.contents) 100 101 # Create school fee ticket for returning students 102 self.certificate.study_mode = u'ug_pt' 103 IWorkflowState(self.student).setState('returning') 104 configuration = createObject('waeup.SessionConfiguration') 105 configuration.academic_session = 2005 106 self.app['configuration'].addSessionConfiguration(configuration) 107 self.browser.open(self.payments_path + '/addop') 108 self.browser.getControl(name="form.p_category").value = ['schoolfee'] 109 self.browser.getControl("Create ticket").click() 110 ctrl = self.browser.getControl(name='val_id') 111 value = ctrl.options[1] 112 self.browser.getLink(value).click() 113 self.browser.getLink("CollegePAY", index=0).click() 114 self.assertMatches('...<input type="hidden" name="pay_item_id" value="5701" />...', 115 self.browser.contents) 116 self.assertMatches( 117 '...<input type="hidden" name="amount" value="2000000.0" />...', 118 self.browser.contents) 119 self.assertMatches( 120 '...item_name="School Fee" item_amt="1835000" bank_id="00" acct_num="000000000000"...', 95 121 self.browser.contents) 96 122 self.assertMatches( … … 102 128 self.browser.getControl(name="form.p_category").value = ['clearance'] 103 129 self.browser.getControl("Create ticket").click() 104 self.assertMatches('...ticket created...',105 self.browser.contents)106 130 ctrl = self.browser.getControl(name='val_id') 107 value = ctrl.options[ 1]131 value = ctrl.options[2] 108 132 self.browser.getLink(value).click() 109 self.assertMatches('...Amount Authorized...',110 self.browser.contents)111 133 self.assertMatches( 112 134 '...<span>45000.0</span>...', … … 114 136 # Manager can access InterswitchForm 115 137 self.browser.getLink("CollegePAY", index=0).click() 116 self.assertMatches('...Total Amount Authorized:...', 117 self.browser.contents) 118 # The total amount to be processed by Interswitch 119 # has been reduced by the Interswitch fee of 150 Nairas 138 self.assertMatches('...<input type="hidden" name="pay_item_id" value="5702" />...', 139 self.browser.contents) 120 140 self.assertMatches('...Total Amount Authorized:...', 121 141 self.browser.contents)
Note: See TracChangeset for help on using the changeset viewer.