Ignore:
Timestamp:
30 Oct 2012, 17:31:43 (12 years ago)
Author:
Henrik Bettermann
Message:

We need to import old scratch card payments.

File:
1 edited

Legend:

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

    r9466 r9467  
    909909        payment1.p_id = 'nonsense'
    910910        # payment1.p_id will be replaced if p_id doesn't start with 'p'
     911        # and is not an old PIN
    911912        self.processor.addEntry(
    912913            payment2, dict(student_id=self.student.student_id, p_id='XXXXXX456'),
     
    923924        self.assertEqual(len(errs),0)
    924925        errs, inv_errs, conv_dict = self.processor.checkConversion(
     926            dict(p_id='ABC-11-1234567890'))
     927        self.assertEqual(len(errs),0)
     928        errs, inv_errs, conv_dict = self.processor.checkConversion(
    925929            dict(p_id='nonsense'))
    926930        self.assertEqual(len(errs),1)
     
    935939            self.csv_file, PAYMENT_HEADER_FIELDS,'create')
    936940        self.assertEqual(num_warns,0)
     941
    937942        payment = self.processor.getEntry(dict(reg_number='1',
    938943            p_id='p2907979737440'), self.app)
     
    942947        self.assertEqual(cdate, "2010-11-26 18:59:33")
    943948        self.assertEqual(str(payment.creation_date.tzinfo),'UTC')
     949
    944950        payment = self.processor.getEntry(dict(matric_number='100001',
    945951            p_id='p2907125937570'), self.app)
     
    953959        self.assertEqual(cdate, "2010-11-25 21:16:33")
    954960        self.assertEqual(str(payment.creation_date.tzinfo),'UTC')
     961
     962        payment = self.processor.getEntry(dict(reg_number='3',
     963            p_id='ABC-11-1234567890'), self.app)
     964        self.assertEqual(payment.amount_auth, 19500.6)
     965
    955966        shutil.rmtree(os.path.dirname(fin_file))
    956967        logcontent = open(self.logfile).read()
     
    961972            'p_category=schoolfee, amount_auth=19500.0, p_current=True, '
    962973            'p_id=p1266236341955, r_code=00, r_amount_approved=19500.0, '
     974            'p_state=paid'
     975            in logcontent)
     976        self.assertTrue(
     977            'INFO - system - K1000001 - Payment ticket updated: '
     978            'p_item=BTECHBDT, creation_date=2010-02-15 13:19:01+00:00, '
     979            'p_category=schoolfee, amount_auth=19500.6, p_current=True, '
     980            'p_id=ABC-11-1234567890, r_code=SC, r_amount_approved=19500.0, '
    963981            'p_state=paid'
    964982            in logcontent)
Note: See TracChangeset for help on using the changeset viewer.