Changeset 13306 for main/waeup.kwarapoly/trunk/src/waeup
- Timestamp:
- 12 Oct 2015, 05:06:37 (9 years ago)
- Location:
- main/waeup.kwarapoly/trunk/src/waeup/kwarapoly
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/interswitch/tests.py
r13237 r13306 147 147 self.assertMatches('...Amount Authorized...', self.browser.contents) 148 148 self.assertMatches( 149 '...<span>3 0500.0</span>...',149 '...<span>31500.0</span>...', 150 150 self.browser.contents) 151 151 self.payment_url = self.browser.url … … 163 163 self.browser.contents) 164 164 self.assertTrue( 165 '<input type="hidden" name="amount" value="3 050000" />' in166 self.browser.contents) 167 self.assertTrue( 168 'item_name="School Fee" item_amt="2 720000" bank_id="120" acct_num="1771586608"' in165 '<input type="hidden" name="amount" value="3150000" />' in 166 self.browser.contents) 167 self.assertTrue( 168 'item_name="School Fee" item_amt="2820000" bank_id="120" acct_num="1771586608"' in 169 169 self.browser.contents) 170 170 self.assertTrue( -
main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/students/tests/test_browser.py
r13061 r13306 36 36 from waeup.kwarapoly.testing import FunctionalLayer 37 37 from waeup.kwarapoly.students.utils import ( 38 local_nonlocal, arts_science, pt_ft)38 local_nonlocal, arts_science, we_ft) 39 39 40 40 … … 220 220 self.assertEqual(local_nonlocal(self.student), 'non-local') 221 221 self.assertEqual(arts_science(self.student), 'science') 222 self.assertEqual( pt_ft(self.student), 'ft')222 self.assertEqual(we_ft(self.student), 'ft') 223 223 224 224 # Maint payment checking disabled on 5th Dec 2014 … … 237 237 self.assertEqual(payment.p_level, 100) 238 238 self.assertEqual(payment.p_session, 2004) 239 self.assertEqual(payment.amount_auth, 5 3900.0)239 self.assertEqual(payment.amount_auth, 55200.0) 240 240 self.assertEqual(payment.p_item, u'CERT1') 241 241 self.assertEqual(error, None) … … 250 250 self.assertEqual(payment.p_level, 200) 251 251 self.assertEqual(payment.p_session, 2005) 252 self.assertEqual(payment.amount_auth, 3 3090.0)252 self.assertEqual(payment.amount_auth, 34090.0) 253 253 self.assertEqual(payment.p_item, u'CERT1') 254 254 self.assertEqual(error, None) … … 256 256 configuration.penalty_ug = 5000.0 257 257 error, payment = utils.setPaymentDetails('schoolfee',self.student) 258 self.assertEqual(payment.amount_auth, 3 8090.0)258 self.assertEqual(payment.amount_auth, 39090.0) 259 259 self.assertEqual(error, None) 260 260 … … 277 277 self.assertEqual(payment.p_level, 100) 278 278 self.assertEqual(payment.p_session, 2004) 279 self.assertEqual(payment.amount_auth, 7000.0)279 self.assertEqual(payment.amount_auth, 10000.0) 280 280 self.assertEqual(payment.p_item, u'2 CarryOvers') 281 281 self.assertEqual(payment.p_category, 'schoolfee') … … 285 285 self.assertEqual(payment.p_level, 100) 286 286 self.assertEqual(payment.p_session, 2004) 287 self.assertEqual(payment.amount_auth, 8000.0)287 self.assertEqual(payment.amount_auth, 15000.0) 288 288 self.assertEqual(payment.p_item, u'3 CarryOvers') 289 289 self.assertEqual(payment.p_category, 'schoolfee') -
main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/students/utils.py
r13131 r13306 47 47 48 48 FEES_PARAMS = ( 49 ('ft', ' pt'),49 ('ft', 'we'), 50 50 ('local', 'non-local'), 51 51 ('science','arts'), … … 56 56 ( 57 57 ( # 10 100 110 200 210 300 400 410 500 510 600 999 58 (34500.0, 39400.0, 28800.0, 30500.0, 28800.0, 0.0, 40000.0, 29900.0, 33700.0, 29900.0, 0.0, 48750.0), # science59 (34500.0, 3 7900.0, 27300.0, 29000.0, 27300.0, 0.0, 38500.0, 28400.0, 32200.0, 28400.0, 0.0, 47200.0) # arts58 (34500.0, 40700.0, 33600.0, 31500.0, 33600.0, 0.0, 46200.0, 35600.0, 34700.0, 35600.0, 0.0, 48750.0), # science 59 (34500.0, 38700.0, 31600.0, 29500.0, 31600.0, 0.0, 44200.0, 33600.0, 32700.0, 33600.0, 0.0, 47200.0) # arts 60 60 ), # local 61 61 ( # 10 100 110 200 210 300 400 410 500 510 600 999 62 (49600.0, 5 3900.0, 35900.0, 33090.0, 35900.0, 0.0, 56400.0, 38600.0, 36900.0, 38600.0, 0.0, 63180.0), # science63 (49600.0, 5 2400.0, 34400.0, 31590.0, 34400.0, 0.0, 54900.0, 37100.0, 35400.0, 37100.0, 0.0, 61680.0) # arts62 (49600.0, 55200.0, 41100.0, 34090.0, 41100.0, 0.0, 60700.0, 45600.0, 37900.0, 45600.0, 0.0, 63180.0), # science 63 (49600.0, 53200.0, 39100.0, 32090.0, 39100.0, 0.0, 58700.0, 43600.0, 35900.0, 43600.0, 0.0, 61680.0) # arts 64 64 ), # non-local 65 65 ), # ft 66 66 ( 67 67 ( # 10 100 110 200 210 300 400 410 500 510 600 999 68 (0.0, 4 0700.0, 28800.0, 30900.0, 28800.0, 30900.0, 41100.0, 29900.0, 33050.0, 29900.0, 33050.0, 0.0), # science69 (0.0, 39200.0, 27300.0, 29400.0, 27300.0, 29400.0, 39600.0, 28400.0, 31550.0, 28400.0, 31550.0, 0.0) # arts68 (0.0, 42000.0, 33600.0, 33400.0, 33600.0, 33400.0, 42400.0, 35600.0, 37500.0, 35600.0, 37500.0, 0.0), # science 69 (0.0, 40000.0, 31600.0, 31400.0, 31600.0, 31400.0, 40400.0, 33600.0, 35500.0, 33600.0, 35500.0, 0.0) # arts 70 70 ), # local 71 71 ( # 10 100 110 200 210 300 400 410 500 510 600 999 72 (0.0, 5 5400.0, 35900.0, 34850.0, 35900.0, 34850.0, 57800.0, 38600.0, 44350.0, 38600.0, 44350.0, 0.0), # science73 (0.0, 5 3900.0, 34400.0, 33350.0, 34400.0, 33350.0, 56300.0, 37100.0, 42850.0, 37100.0, 42850.0, 0.0) # arts72 (0.0, 56700.0, 41100.0, 36350.0, 41100.0, 36350.0, 57600.0, 45600.0, 45850.0, 45600.0, 45850.0, 0.0), # science 73 (0.0, 54700.0, 39100.0, 34350.0, 39100.0, 34350.0, 55600.0, 43600.0, 43850.0, 43600.0, 43850.0, 0.0) # arts 74 74 ), # non-local 75 ), # pt75 ), # we 76 76 ) 77 77 … … 91 91 return 'science' 92 92 93 def pt_ft(student):94 if student.current_mode.endswith(' pt'):95 return ' pt'93 def we_ft(student): 94 if student.current_mode.endswith('we'): 95 return 'we' 96 96 else: 97 97 return 'ft' … … 241 241 if p_level in PAYMENT_LEVELS: 242 242 amount = SCHOOL_FEES.get_fee( 243 ( pt_ft(student),243 (we_ft(student), 244 244 local_nonlocal(student), 245 245 arts_science(student), … … 249 249 amount = 6000.0 250 250 elif category == 'carryover2': 251 amount = 7000.0251 amount = 10000.0 252 252 elif category == 'carryover3': 253 amount = 8000.0253 amount = 15000.0 254 254 255 255 else:
Note: See TracChangeset for help on using the changeset viewer.