Changeset 8626 for main/waeup.kofa/trunk/src
- Timestamp:
- 4 Jun 2012, 11:30:01 (13 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/students
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/batching.py
r8581 r8626 442 442 return studycourse.get(row['level']) 443 443 444 def updateEntry(self, obj, row, site): 445 """Update obj to the values given in row. 446 """ 447 items_changed = super(StudentStudyLevelProcessor, self).updateEntry( 448 obj, row, site) 449 student = self.getParent(row, site).__parent__ 450 student.__parent__.logger.info( 451 '%s - Study level updated: %s' 452 % (student.student_id, items_changed)) 453 return 454 444 455 def addEntry(self, obj, row, site): 445 456 parent = self.getParent(row, site) … … 492 503 return None 493 504 return level.get(row['code']) 505 506 def updateEntry(self, obj, row, site): 507 """Update obj to the values given in row. 508 """ 509 items_changed = super(CourseTicketProcessor, self).updateEntry( 510 obj, row, site) 511 student = self.getParent(row, site).__parent__.__parent__ 512 student.__parent__.logger.info( 513 '%s - Course ticket updated: %s' 514 % (student.student_id, items_changed)) 515 return 494 516 495 517 def addEntry(self, obj, row, site): … … 561 583 entry = payments.get('p' + p_id[6:]) 562 584 return entry 585 586 def updateEntry(self, obj, row, site): 587 """Update obj to the values given in row. 588 """ 589 items_changed = super(StudentOnlinePaymentProcessor, self).updateEntry( 590 obj, row, site) 591 student = self.getParent(row, site).__parent__ 592 student.__parent__.logger.info( 593 '%s - Payment ticket updated: %s' 594 % (student.student_id, items_changed)) 595 return 563 596 564 597 def addEntry(self, obj, row, site): -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_batching.py
r8491 r8626 150 150 self.app['faculties']['fac1']['dep1'].certificates.addCertificate( 151 151 self.certificate) 152 153 self.logfile = os.path.join( 154 self.app['datacenter'].storage, 'logs', 'students.log') 152 155 return 153 156 … … 647 650 shutil.rmtree(os.path.dirname(fin_file)) 648 651 652 logcontent = open(self.logfile).read() 653 # Logging message from updateEntry, 654 self.assertTrue( 655 'INFO - system - K1000000 - Study level ' 656 'updated: level=100, level_verdict=C, level_session=2009' 657 in logcontent) 658 649 659 def test_import_update(self): 650 660 # We perform the same import twice, … … 741 751 self.assertEqual(courseticket.semester, 1) 742 752 shutil.rmtree(os.path.dirname(fin_file)) 753 754 logcontent = open(self.logfile).read() 755 # Logging message from updateEntry, 756 self.assertTrue( 757 'INFO - system - K1000000 - Course ticket updated: code=COURSE1, ' 758 'mandatory=False, score=3' 759 in logcontent) 743 760 744 761 def test_import_update(self): … … 844 861 shutil.rmtree(os.path.dirname(fin_file)) 845 862 863 logcontent = open(self.logfile).read() 864 # Logging message from updateEntry, 865 self.assertTrue( 866 'INFO - system - K1000001 - Payment ticket updated: ' 867 'p_id=p1266236341955, p_item=BTECHBDT, ' 868 'creation_date=2010-02-15 13:19:01+00:00, r_code=00, ' 869 'r_amount_approved=19500.0, p_category=schoolfee, ' 870 'amount_auth=19500.0, p_state=paid' 871 in logcontent) 872 846 873 def test_import_update(self): 847 874 # We perform the same import twice,
Note: See TracChangeset for help on using the changeset viewer.