source: main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/tests/test_payments.py

Last change on this file was 12658, checked in by uli, 10 years ago

Override default PaymentGWLister.

File size: 814 bytes
Line 
1from zope.component import queryUtility
2from waeup.ikoba.payments.interfaces import (
3    IPaymentGatewayServicesLister, IPaymentGatewayService,
4)
5from ikobacustom.pcn.testing import FunctionalTestCase, FunctionalLayer
6from ikobacustom.pcn.payments import PCNPaymentGatewayServicesLister
7
8
9class PaymentsTests(FunctionalTestCase):
10
11    layer = FunctionalLayer
12
13    def test_get_filtered_payment_providers(self):
14        result = PCNPaymentGatewayServicesLister()()
15        assert len(result) >= 0
16        for service in result.values():
17            assert IPaymentGatewayService.providedBy(service)
18
19    def test_filtered_payment_providers_registered(self):
20        util = queryUtility(IPaymentGatewayServicesLister)
21        assert util is not None
22        assert isinstance(util, PCNPaymentGatewayServicesLister)
Note: See TracBrowser for help on using the repository browser.