- Timestamp:
- 21 Mar 2015, 13:22:39 (10 years ago)
- 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 70 70 @property 71 71 def title(self): 72 id_part = self.context.payment_id[ 4:12]72 id_part = self.context.payment_id[:9] 73 73 return _(u"Payment ${id}", mapping={'id': id_part}) 74 74 -
main/waeup.ikoba/trunk/src/waeup/ikoba/payments/payment.py
r12800 r12808 205 205 self.creation_date = datetime.utcnow() 206 206 self.payment_date = None 207 self.payment_id = u 'PAY_' + unicode(uuid.uuid4().hex)207 self.payment_id = unicode(uuid.uuid4().hex) 208 208 self.state = STATE_UNPAID 209 209 self.currency = payable.currency -
main/waeup.ikoba/trunk/src/waeup/ikoba/payments/tests/test_payment.py
r12800 r12808 275 275 276 276 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>" 278 278 id1 = Payment(self.payer, self.payable).payment_id 279 279 assert isinstance(id1, basestring) 280 assert re.match(' PAY_[0-9a-f]{32}', id1)280 assert re.match('[0-9a-f]{32}', id1) 281 281 282 282 def test_initial_state_is_unpaid(self):
Note: See TracChangeset for help on using the changeset viewer.