Ignore:
Timestamp:
4 Jun 2012, 11:30:01 (13 years ago)
Author:
Henrik Bettermann
Message:

Log updateEntry when importing study levels, course tickets and payment tickets.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_batching.py

    r8491 r8626  
    150150        self.app['faculties']['fac1']['dep1'].certificates.addCertificate(
    151151            self.certificate)
     152
     153        self.logfile = os.path.join(
     154            self.app['datacenter'].storage, 'logs', 'students.log')
    152155        return
    153156
     
    647650        shutil.rmtree(os.path.dirname(fin_file))
    648651
     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
    649659    def test_import_update(self):
    650660        # We perform the same import twice,
     
    741751        self.assertEqual(courseticket.semester, 1)
    742752        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)
    743760
    744761    def test_import_update(self):
     
    844861        shutil.rmtree(os.path.dirname(fin_file))
    845862
     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
    846873    def test_import_update(self):
    847874        # We perform the same import twice,
Note: See TracChangeset for help on using the changeset viewer.