Changeset 15747 for main/kofacustom.coewarri
- Timestamp:
- 4 Nov 2019, 08:21:21 (5 years ago)
- Location:
- main/kofacustom.coewarri/trunk/src/kofacustom/coewarri
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.coewarri/trunk/src/kofacustom/coewarri/interswitch/tests.py
r15322 r15747 68 68 self.browser.contents) 69 69 self.assertMatches( 70 '...<span> 79450.0</span>...',70 '...<span>80450.0</span>...', 71 71 self.browser.contents) 72 72 self.payment_url = self.browser.url 73 self.browser.getLink(" CollegePAY", index=0).click()73 self.browser.getLink("Pay via Interswitch", index=0).click() 74 74 self.assertMatches('...<input type="hidden" name="pay_item_id" value="103" />...', 75 75 self.browser.contents) … … 78 78 self.assertEqual(self.student.current_mode, 'ug_ft') 79 79 self.assertMatches( 80 '...<input type="hidden" name="amount" value=" 7945000" />...',81 self.browser.contents) 82 self.assertMatches( 83 '...item_name="School Fee (total)" item_amt=" 7945000" bank_id="7" acct_num="1019684470"...',80 '...<input type="hidden" name="amount" value="8045000" />...', 81 self.browser.contents) 82 self.assertMatches( 83 '...item_name="School Fee (total)" item_amt="8045000" bank_id="7" acct_num="1019684470"...', 84 84 self.browser.contents) 85 85 … … 94 94 self.student['payments']['xyz'] = acc_payment 95 95 self.browser.open(self.payments_path + '/xyz') 96 self.browser.getLink(" CollegePAY", index=0).click()96 self.browser.getLink("Pay via Interswitch", index=0).click() 97 97 self.assertMatches('...<input type="hidden" name="pay_item_id" value="102" />...', 98 98 self.browser.contents) … … 106 106 acc_payment.creation_date -= delta 107 107 self.browser.open(self.payments_path + '/xyz') 108 self.browser.getLink(" CollegePAY", index=0).click()108 self.browser.getLink("Pay via Interswitch", index=0).click() 109 109 self.assertMatches( 110 110 '...This payment ticket is too old. Please create a new ticket...', … … 113 113 acc_payment.creation_date += delta 114 114 self.browser.open(self.payments_path + '/xyz') 115 self.browser.getLink(" CollegePAY", index=0).click()115 self.browser.getLink("Pay via Interswitch", index=0).click() 116 116 self.assertMatches('...Total Amount Authorized:...', 117 117 self.browser.contents) … … 232 232 def test_interswitch_form(self): 233 233 # Manager can access InterswitchForm 234 self.browser.getLink(" CollegePAY", index=0).click()234 self.browser.getLink("Pay via Interswitch", index=0).click() 235 235 self.assertMatches('...Total Amount Authorized:...', 236 236 self.browser.contents) … … 241 241 self.applicant.values()[0].creation_date -= delta 242 242 self.browser.open(self.payment_url) 243 self.browser.getLink(" CollegePAY", index=0).click()243 self.browser.getLink("Pay via Interswitch", index=0).click() 244 244 self.assertMatches( 245 245 '...This payment ticket is too old. Please create a new ticket...', -
main/kofacustom.coewarri/trunk/src/kofacustom/coewarri/students/tests/test_browser.py
r14941 r15747 74 74 self.assertEqual(self.student['payments'].values()[0].p_category, 'schoolfee_1') 75 75 self.assertEqual(self.student['payments'].values()[1].p_category, 'schoolfee_2') 76 # 79200 / 2 + 25077 self.assertEqual(self.student['payments'].values()[0].amount_auth, 39850.0)78 self.assertEqual(self.student['payments'].values()[1].amount_auth, 39850.0)76 # 80200 / 2 + 250 77 self.assertEqual(self.student['payments'].values()[0].amount_auth, 40350.0) 78 self.assertEqual(self.student['payments'].values()[1].amount_auth, 40350.0) 79 79 # The two payments belong to the same session and level. 80 80 self.assertEqual(self.student['payments'].values()[0].p_session, 2004) … … 104 104 self.assertEqual(self.student.current_level, 200) 105 105 self.assertEqual(self.student.current_session, 2005) 106 # 63100 / 2 + 250107 self.assertEqual(self.student['payments'].values()[2].amount_auth, 37 600.0)108 self.assertEqual(self.student['payments'].values()[3].amount_auth, 37 600.0)106 # 73700 / 2 + 250 107 self.assertEqual(self.student['payments'].values()[2].amount_auth, 37100.0) 108 self.assertEqual(self.student['payments'].values()[3].amount_auth, 37100.0) 109 109 # The last two payments belong to the same session and level. 110 110 self.assertEqual(self.student['payments'].values()[2].p_session, 2005) -
main/kofacustom.coewarri/trunk/src/kofacustom/coewarri/students/tests/test_export.py
r15670 r15747 103 103 result = open(self.outfile, 'rb').read() 104 104 self.assertMatches( 105 'ac,amount_auth,creation_date,gateway_amt, p_category,p_combi,p_current,'105 'ac,amount_auth,creation_date,gateway_amt,net_amt,p_category,p_combi,p_current,' 106 106 'p_id,p_item,p_level,p_session,p_state,payment_date,provider_amt,' 107 107 'r_amount_approved,r_card_num,r_code,r_company,r_desc,' 108 108 'r_pay_reference,thirdparty_amt,student_id,state,' 109 109 'current_session\r\n' 110 '666,12.12,%s-04-01 13:12:01#,, schoolfee,[],1,my-id,p-item,'110 '666,12.12,%s-04-01 13:12:01#,,,schoolfee,[],1,my-id,p-item,' 111 111 '100,%s,paid,%s-04-01 14:12:01#,,12.12,' 112 112 '789,r-code,interswatch,,,,A111111,created,2012\r\n' -
main/kofacustom.coewarri/trunk/src/kofacustom/coewarri/students/tests/test_utils.py
r15443 r15747 31 31 self.assertEqual(payment.p_level, 100) 32 32 self.assertEqual(payment.p_session, 2016) 33 self.assertEqual(payment.amount_auth, 79450.0)33 self.assertEqual(payment.amount_auth, 80450.0) 34 34 self.assertEqual(payment.p_item, u'CERT1') 35 35 self.assertEqual(error, None) … … 38 38 self.assertEqual(payment.p_level, 100) 39 39 self.assertEqual(payment.p_session, 2016) 40 self.assertEqual(payment.amount_auth, 39850.0)40 self.assertEqual(payment.amount_auth, 40350.0) 41 41 self.assertEqual(payment.p_item, u'CERT1') 42 42 self.assertEqual(error, None) … … 45 45 self.assertEqual(payment.p_level, 100) 46 46 self.assertEqual(payment.p_session, 2016) 47 self.assertEqual(payment.amount_auth, 39850.0)47 self.assertEqual(payment.amount_auth, 40350.0) 48 48 self.assertEqual(payment.p_item, u'CERT1') 49 49 self.assertEqual(error, None) … … 55 55 self.student.lga = 'delta_burutu' 56 56 error, payment = utils.setPaymentDetails('schoolfee',self.student) 57 self.assertEqual(payment.amount_auth, 69450.0)57 self.assertEqual(payment.amount_auth, 70450.0) 58 58 error, payment = utils.setPaymentDetails('clearance',self.student) 59 59 self.assertEqual(payment.amount_auth, 20300.0) -
main/kofacustom.coewarri/trunk/src/kofacustom/coewarri/students/utils.py
r15680 r15747 43 43 FEES_VALUES = ( 44 44 ( # 100 110 200 210 300 310 400 410 500 999 45 (4 2200.0, 42200.0, 39700.0, 39700.0, 37200.0, 37200.0, 0.0, 0.0, 0.0, 0.0), # nce_ft46 (55200.0, 55200.0, 49200.0, 49200.0, 5 2200.0, 52200.0, 42200.0, 42200.0, 0.0, 0.0), # nce_pt47 ( 69200.0, 69200.0, 64700.0, 64700.0, 67700.0, 67700.0, 62100.0, 62100.0, 0.0, 0.0), # ug_ft48 (33 000.0, 33000.0, 28000.0, 28000.0, 28000.0, 28000.0, 20000.0, 20000.0, 0.0, 0.0), # nce_we_pt45 (43200.0, 43200.0, 42700.0, 42700.0, 37200.0, 37200.0, 0.0, 0.0, 0.0, 0.0), # nce_ft 46 (55200.0, 55200.0, 49200.0, 49200.0, 53200.0, 53200.0, 49200.0, 49200.0, 0.0, 0.0), # nce_pt 47 (70200.0, 70200.0, 63700.0, 63700.0, 70700.0, 70700.0, 61700.0, 61700.0, 0.0, 0.0), # ug_ft 48 (33200.0, 33200.0, 28000.0, 28000.0, 32000.0, 32000.0, 28000.0, 28000.0, 0.0, 0.0), # nce_we_pt 49 49 ), # local 50 50 ( # 51 (5 4800.0, 54800.0, 52300.0, 52300.0, 49800.0, 49800.0, 0.0, 0.0, 0.0, 0.0), # nce_ft52 (55200.0, 55200.0, 49200.0, 49200.0, 5 2200.0, 52200.0, 42200.0, 42200.0, 0.0, 0.0), # nce_pt53 ( 79200.0, 79200.0, 74700.0, 74700.0, 77700.0, 77700.0, 62100.0, 62100.0, 0.0, 0.0), # ug_ft54 (33 000.0, 33000.0, 28000.0, 28000.0, 28000.0, 28000.0, 20000.0, 20000.0, 0.0, 0.0), # nce_we_pt51 (55800.0, 55800.0, 54800.0, 54800.0, 49800.0, 49800.0, 0.0, 0.0, 0.0, 0.0), # nce_ft 52 (55200.0, 55200.0, 49200.0, 49200.0, 53200.0, 53200.0, 49200.0, 49200.0, 0.0, 0.0), # nce_pt 53 (80200.0, 80200.0, 73700.0, 73700.0, 80700.0, 80700.0, 71700.0, 71700.0, 0.0, 0.0), # ug_ft 54 (33200.0, 33200.0, 28000.0, 28000.0, 32000.0, 32000.0, 28000.0, 28000.0, 0.0, 0.0), # nce_we_pt 55 55 ), # non-local 56 56 )
Note: See TracChangeset for help on using the changeset viewer.