Ignore:
Timestamp:
24 Jan 2015, 09:27:40 (10 years ago)
Author:
Henrik Bettermann
Message:

Check if p_id exists in payments_catalog when importing payment tickets in create mode.

File:
1 edited

Legend:

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

    r12415 r12513  
    288288        # XXX: there is no addPayment method to give predictable names
    289289        self.payment = student['payments']['my-payment'] = payment
     290        notify(grok.ObjectModifiedEvent(self.payment))
    290291        return payment
    291292
     
    10651066            dict(p_id=p_id))
    10661067        self.assertEqual(len(errs),0)
     1068        dup_payment = createObject(u'waeup.StudentOnlinePayment')
     1069        dup_payment.p_id = 'XYZ-99-1234567890'
     1070        self.student['payments'][dup_payment.p_id] = dup_payment
     1071        errs, inv_errs, conv_dict = self.processor.checkConversion(
     1072            dict(p_id='XYZ-99-1234567890'), mode='create')
     1073        self.assertEqual(len(errs),1)
     1074        self.assertEqual(errs[0], ('p_id', u'p_id exists in K1000000 '))
    10671075
    10681076    def test_import(self):
Note: See TracChangeset for help on using the changeset viewer.