Ignore:
Timestamp:
23 Mar 2015, 15:56:55 (10 years ago)
Author:
uli
Message:

Aggregate payment-related testing components.

File:
1 edited

Legend:

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

    r12808 r12813  
    2626    )
    2727from zope.component.hooks import setSite
    28 from zope.interface import implements, implementer
     28from zope.interface import implements
    2929from zope.interface.verify import verifyClass, verifyObject
    3030from waeup.ikoba.payments.interfaces import (
    3131    IPayment, STATE_UNPAID, STATE_PAID, STATE_FAILED,
    3232    IPaymentGatewayService, IPaymentItem, IPaymentGatewayServicesLister,
    33     IPayableFinder, IPayerFinder, IPayable, IPayer,
     33    IPayableFinder, IPayerFinder,
    3434    )
    3535from waeup.ikoba.app import Company
     
    3939    find_payer_from_payer_id, get_payments_from_payable_id, format_amount,
    4040    )
    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")),
     41from waeup.ikoba.payments.testing import (
     42    FakePayer, FakePayable, FAKE_PAYMENT_ITEMS
    5743    )
    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
     44from waeup.ikoba.testing import FunctionalLayer, FunctionalTestCase
    7145
    7246
Note: See TracChangeset for help on using the changeset viewer.