Changeset 15345 for main/kofacustom.dspg/trunk/src
- Timestamp:
- 6 Mar 2019, 21:33:16 (6 years ago)
- Location:
- main/kofacustom.dspg/trunk/src/kofacustom/dspg
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.dspg/trunk/src/kofacustom/dspg/interswitch/tests.py
r15255 r15345 205 205 self.assertTrue('<item_detail item_id="3" item_name="WAEAC" item_amt="280000" bank_id="8" acct_num="2028964403" />' 206 206 in self.browser.contents) 207 self.assertTrue('<item_detail item_id="4" item_name="Technology Fee" item_amt="120000" bank_id=" 307" acct_num="5100189030" />'207 self.assertTrue('<item_detail item_id="4" item_name="Technology Fee" item_amt="120000" bank_id="10" acct_num="0032256360" />' 208 208 in self.browser.contents) 209 209 -
main/kofacustom.dspg/trunk/src/kofacustom/dspg/students/tests/test_utils.py
r15288 r15345 42 42 msg, mnumber = utils.setMatricNumber(self.student) 43 43 self.assertEqual(self.student.matric_number, 'dep1/ND/04/00001') 44 self.assertEqual(site['configuration'].next_matric_integer, 2) 44 45 self.assertEqual(msg, None) 45 46 # hnd_ft … … 48 49 msg, mnumber = utils.setMatricNumber(self.student) 49 50 self.assertEqual(self.student.matric_number, 'dep1/HND/04/00001') 51 self.assertEqual(site['configuration'].next_matric_integer_2, 2) 50 52 self.assertEqual(msg, None) 51 53 # nd_pt … … 54 56 msg, mnumber = utils.setMatricNumber(self.student) 55 57 self.assertEqual(self.student.matric_number, 'dep1/ND/04/10001') 58 self.assertEqual(site['configuration'].next_matric_integer_3, 10002) 56 59 self.assertEqual(msg, None) 57 60 # hnd_pt … … 60 63 msg, mnumber = utils.setMatricNumber(self.student) 61 64 self.assertEqual(self.student.matric_number, 'dep1/HND/04/10001') 65 self.assertEqual(site['configuration'].next_matric_integer_4, 10002) 62 66 self.assertEqual(msg, None) 63 67 return -
main/kofacustom.dspg/trunk/src/kofacustom/dspg/students/utils.py
r15288 r15345 317 317 318 318 return _('Matriculation number cannot be set.'), None 319 320 def increaseMatricInteger(self, student): 321 """Increase counter for matric numbers. 322 """ 323 if student.current_mode == 'nd_ft': 324 grok.getSite()['configuration'].next_matric_integer += 1 325 return 326 elif student.current_mode == 'hnd_ft': 327 grok.getSite()['configuration'].next_matric_integer_2 += 1 328 return 329 elif student.current_mode in ('nd_pt, nd_we'): 330 grok.getSite()['configuration'].next_matric_integer_3 += 1 331 return 332 elif student.current_mode in ('hnd_pt, hnd_we'): 333 grok.getSite()['configuration'].next_matric_integer_4 += 1 334 return 335 return
Note: See TracChangeset for help on using the changeset viewer.