Changeset 12813 for main/waeup.ikoba/trunk/src/waeup/ikoba/payments/tests
- Timestamp:
- 23 Mar 2015, 15:56:55 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.ikoba/trunk/src/waeup/ikoba/payments/tests/test_payment.py
r12808 r12813 26 26 ) 27 27 from zope.component.hooks import setSite 28 from zope.interface import implements , implementer28 from zope.interface import implements 29 29 from zope.interface.verify import verifyClass, verifyObject 30 30 from waeup.ikoba.payments.interfaces import ( 31 31 IPayment, STATE_UNPAID, STATE_PAID, STATE_FAILED, 32 32 IPaymentGatewayService, IPaymentItem, IPaymentGatewayServicesLister, 33 IPayableFinder, IPayerFinder, IPayable, IPayer,33 IPayableFinder, IPayerFinder, 34 34 ) 35 35 from waeup.ikoba.app import Company … … 39 39 find_payer_from_payer_id, get_payments_from_payable_id, format_amount, 40 40 ) 41 from waeup.ikoba.testing import (FunctionalLayer, FunctionalTestCase) 42 43 44 @implementer(IPayer) 45 class FakePayer(object): 46 47 def __init__( 48 self, payer_id=u'PAYER_01', first_name=u'Anna', last_name='Tester'): 49 self.payer_id = payer_id 50 self.first_name = first_name 51 self.last_name = last_name 52 53 54 FAKE_PAYMENT_ITEMS = ( 55 PaymentItem(u'Item title 1', decimal.Decimal("1.00")), 56 PaymentItem(u'Item title 2', decimal.Decimal("2.2")), 41 from waeup.ikoba.payments.testing import ( 42 FakePayer, FakePayable, FAKE_PAYMENT_ITEMS 57 43 ) 58 59 60 @implementer(IPayable) 61 class FakePayable(object): 62 63 payable_id = u'id1' 64 65 def __init__(self, payable_id=u'PAYABLE_01', title=u'title', 66 currency=u'USD', payment_items=FAKE_PAYMENT_ITEMS): 67 self.payable_id = payable_id 68 self.title = title 69 self.currency = currency 70 self.payment_items = payment_items 44 from waeup.ikoba.testing import FunctionalLayer, FunctionalTestCase 71 45 72 46
Note: See TracChangeset for help on using the changeset viewer.