Changeset 12808 for main


Ignore:
Timestamp:
21 Mar 2015, 13:22:39 (10 years ago)
Author:
Henrik Bettermann
Message:

Henrik ist mutig.

Location:
main/waeup.ikoba/trunk/src/waeup/ikoba/payments
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.ikoba/trunk/src/waeup/ikoba/payments/browser.py

    r12776 r12808  
    7070    @property
    7171    def title(self):
    72         id_part = self.context.payment_id[4:12]
     72        id_part = self.context.payment_id[:9]
    7373        return _(u"Payment ${id}", mapping={'id': id_part})
    7474
  • main/waeup.ikoba/trunk/src/waeup/ikoba/payments/payment.py

    r12800 r12808  
    205205        self.creation_date = datetime.utcnow()
    206206        self.payment_date = None
    207         self.payment_id = u'PAY_' + unicode(uuid.uuid4().hex)
     207        self.payment_id = unicode(uuid.uuid4().hex)
    208208        self.state = STATE_UNPAID
    209209        self.currency = payable.currency
  • main/waeup.ikoba/trunk/src/waeup/ikoba/payments/tests/test_payment.py

    r12800 r12808  
    275275
    276276    def test_payment_id_format(self):
    277         # payment ids have a special format: "PAY_<32 hex digits>"
     277        # payment ids have a special format: "<32 hex digits>"
    278278        id1 = Payment(self.payer, self.payable).payment_id
    279279        assert isinstance(id1, basestring)
    280         assert re.match('PAY_[0-9a-f]{32}', id1)
     280        assert re.match('[0-9a-f]{32}', id1)
    281281
    282282    def test_initial_state_is_unpaid(self):
Note: See TracChangeset for help on using the changeset viewer.