- Timestamp:
- 24 Dec 2014, 09:17:05 (10 years ago)
- Location:
- main/waeup.ikoba/trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.ikoba/trunk
- Property svn:mergeinfo changed
/main/waeup.ikoba/branches/uli-payments merged: 12113-12117,12132-12141,12152-12154,12157-12159,12163,12179,12198,12248,12276-12278,12294-12296,12305
- Property svn:mergeinfo changed
-
main/waeup.ikoba/trunk/src/waeup/ikoba
-
main/waeup.ikoba/trunk/src/waeup/ikoba/payments/tests/test_interfaces.py
r12060 r12311 17 17 ## 18 18 """ 19 Tests for payments .19 Tests for payments interfaces. 20 20 """ 21 from zope.interface.verify import verifyClass, verifyObject 22 from waeup.ikoba.payments.interfaces import ( 23 IPaymentsContainer, IOnlinePayment) 24 from waeup.ikoba.payments.container import PaymentsContainer 25 from waeup.ikoba.payments.payment import OnlinePayment 21 from waeup.ikoba.payments.interfaces import PaymentGatewayServicesSource 26 22 from waeup.ikoba.testing import (FunctionalLayer, FunctionalTestCase) 27 23 … … 31 27 layer = FunctionalLayer 32 28 33 def test_interfaces(self): 34 # Make sure the correct interfaces are implemented. 35 self.assertTrue( 36 verifyClass( 37 IPaymentsContainer, PaymentsContainer) 38 ) 39 self.assertTrue( 40 verifyObject( 41 IPaymentsContainer, PaymentsContainer()) 42 ) 43 self.assertTrue( 44 verifyClass( 45 IOnlinePayment, OnlinePayment) 46 ) 47 self.assertTrue( 48 verifyObject( 49 IOnlinePayment, OnlinePayment()) 50 ) 51 return 29 def test_payment_gateway_services_source(self): 30 # the payment gateway services source provides a list of registered 31 # payment gateways 32 source = PaymentGatewayServicesSource() 33 services = list(source) 34 assert len(services) > 0 52 35 53 def test_ base(self):54 # We cannot call the fundamental methods of a base in that case55 container = PaymentsContainer()56 se lf.assertRaises(57 NotImplementedError, container.archive)58 self.assertRaises(59 NotImplementedError, container.clear)36 def test_payment_gateway_services_source_title(self): 37 # we can get titles from gateway sources 38 source = PaymentGatewayServicesSource() 39 service1 = list(source)[0] 40 title = source.factory.getTitle(service1) 41 assert title != service1 42 assert isinstance(title, basestring)
Note: See TracChangeset for help on using the changeset viewer.