Changeset 10448 for main/waeup.kofa/trunk/src/waeup/kofa
- Timestamp:
- 5 Aug 2013, 06:07:53 (11 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/accesscodes
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/accesscodes/accesscode.py
r10028 r10448 344 344 """Get next unused num for given prefix. 345 345 """ 346 # School fee, clearance and hostel application batches start with 0.347 # These batches are being emptily created during initialization of the348 # university instance.349 if prefix in ('CLR', 'SFE', 'HOS' ):346 # School fee, clearance, hostel application and transcript 347 # batches start with 0.These batches are being emptily 348 # created during initialization of the university instance. 349 if prefix in ('CLR', 'SFE', 'HOS', 'TSC'): 350 350 num = 0 351 351 else: … … 450 450 site['accesscodes'] = basecontainer 451 451 logger.info('Installed container for access code batches.') 452 # Create empty school fee, clearance and hostel application AC 452 # Create empty school fee, clearance, hostel application 453 # and transcript AC 453 454 # batches during initialization of university instance. 454 455 cost = 0.0 … … 462 463 basecontainer.createBatch(creation_date, creator, 463 464 'HOS', cost, entry_num) 464 logger.info('Installed empty SFE, CLR and HOS access code batches.') 465 basecontainer.createBatch(creation_date, creator, 466 'TSC', cost, entry_num) 467 logger.info('Installed empty SFE, CLR, HOS and TSC access code batches.') 465 468 return 466 469 … … 475 478 'AccessCodePlugin: Updating site at %s: Nothing to do.' % ( 476 479 site_name, )) 480 if not 'TSC' in site['accesscodes']: 481 site['accesscodes'].createBatch(datetime.utcnow(), 'system', 482 'TSC', 0.0, 0) 483 logger.info('Empty TSC access code batch added.') 477 484 return 478 485 -
main/waeup.kofa/trunk/src/waeup/kofa/accesscodes/tests/test_accesscode.py
r9260 r10448 354 354 assert verifyObject(IAccessCodeBatchContainer, accesscodes) 355 355 assert verifyClass(IAccessCodeBatchContainer, AccessCodeBatchContainer) 356 357 def test_existing_batches(self): 358 self.assertEqual(sorted(self.app['accesscodes'].keys()), 359 [u'BAR-1', u'CLR-0', u'HOS-0', u'SFE-0', u'TSC-0']) 356 360 357 361 def test_csv_import(self): -
main/waeup.kofa/trunk/src/waeup/kofa/accesscodes/tests/test_batching.py
r9706 r10448 107 107 self.csv_file, BATCH_HEADER_FIELDS) 108 108 self.assertEqual(num_warns,0) 109 self.assertEqual(len(self.app['accesscodes'].keys()), 7)109 self.assertEqual(len(self.app['accesscodes'].keys()), 8) 110 110 self.assertEqual(self.app['accesscodes']['CLR-1'].num,1) 111 111 logcontent = open(self.logfile).read()
Note: See TracChangeset for help on using the changeset viewer.