Line | |
---|
1 | from zope.component import queryUtility |
---|
2 | from waeup.ikoba.payments.interfaces import ( |
---|
3 | IPaymentGatewayServicesLister, IPaymentGatewayService, |
---|
4 | ) |
---|
5 | from ikobacustom.pcn.testing import FunctionalTestCase, FunctionalLayer |
---|
6 | from ikobacustom.pcn.payments import PCNPaymentGatewayServicesLister |
---|
7 | |
---|
8 | |
---|
9 | class 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.