Changeset 12461
- Timestamp:
- 13 Jan 2015, 09:09:24 (10 years ago)
- Location:
- main/waeup.ikoba/trunk/src/waeup/ikoba/payments
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.ikoba/trunk/src/waeup/ikoba/payments/payment.py
r12311 r12461 25 25 from zope.component import getUtilitiesFor 26 26 from zope.event import notify 27 from waeup.ikoba.utils.helpers import attrs_to_fields 27 28 from waeup.ikoba.payments.interfaces import ( 28 29 IPayment, STATE_UNPAID, STATE_FAILED, STATE_PAID, 29 IPaymentGatewayService, IPayer, 30 IPaymentGatewayService, IPayer, IPaymentItem, 30 31 ) 31 32 from waeup.ikoba.utils.logger import Logger … … 93 94 self.state = STATE_FAILED 94 95 notify(grok.ObjectModifiedEvent(self)) 96 97 98 @attrs_to_fields 99 class PaymentItem(grok.Model): 100 101 grok.implements(IPaymentItem) -
main/waeup.ikoba/trunk/src/waeup/ikoba/payments/tests/test_payment.py
r12402 r12461 24 24 from waeup.ikoba.payments.interfaces import ( 25 25 IPayment, STATE_UNPAID, STATE_PAID, STATE_FAILED, 26 IPaymentGatewayService, 26 IPaymentGatewayService, IPaymentItem 27 27 ) 28 from waeup.ikoba.payments.payment import Payment, get_payment_providers 28 from waeup.ikoba.payments.payment import ( 29 Payment, get_payment_providers, PaymentItem, 30 ) 29 31 30 32 … … 110 112 p1.mark_failed() 111 113 assert p1.state == STATE_FAILED 114 115 116 class PaymentItemTests(unittest.TestCase): 117 118 def test_iface(self): 119 # PaymentItems fullfill any interface contracts 120 obj = PaymentItem() 121 verifyClass(IPaymentItem, PaymentItem) 122 verifyObject(IPaymentItem, obj)
Note: See TracChangeset for help on using the changeset viewer.