Ignore:
Timestamp:
22 Dec 2014, 16:14:04 (10 years ago)
Author:
uli
Message:

Extend interfaces.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.ikoba/branches/uli-payments/src/waeup/ikoba/payments/tests/test_interfaces.py

    r12159 r12295  
    2020"""
    2121from zope.interface.verify import verifyClass, verifyObject
    22 from waeup.ikoba.payments.interfaces import IPaymentsContainer
     22from waeup.ikoba.payments.interfaces import (
     23    IPaymentsContainer, PaymentGatewayServicesSource,
     24    )
    2325from waeup.ikoba.payments.container import PaymentsContainer
    2426from waeup.ikoba.testing import (FunctionalLayer, FunctionalTestCase)
     
    4850        self.assertRaises(
    4951            NotImplementedError, container.clear)
     52
     53    def test_payment_gateway_services_source(self):
     54        # the payment gateway services source provides a list of registered
     55        # payment gateways
     56        source = PaymentGatewayServicesSource()
     57        services = list(source)
     58        assert len(services) > 0
     59
     60    def test_payment_gateway_services_source_title(self):
     61        # we can get titles from gateway sources
     62        source = PaymentGatewayServicesSource()
     63        service1 = list(source)[0]
     64        title = source.factory.getTitle(service1)
     65        assert title != service1
     66        assert isinstance(title, basestring)
Note: See TracChangeset for help on using the changeset viewer.