Ignore:
Timestamp:
2 Mar 2015, 14:07:26 (10 years ago)
Author:
uli
Message:

Provide an overridable gateway lister.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.ikoba/branches/uli-fake-gw-provider/src/waeup/ikoba/payments/tests/test_payment.py

    r12648 r12655  
    2020import re
    2121import unittest
    22 from zope.component import getUtilitiesFor, getSiteManager
     22from zope.component import getUtilitiesFor, getSiteManager, queryUtility
    2323from zope.interface import implements
    2424from zope.interface.verify import verifyClass, verifyObject
    2525from waeup.ikoba.payments.interfaces import (
    2626    IPayment, STATE_UNPAID, STATE_PAID, STATE_FAILED,
    27     IPaymentGatewayService, IPaymentItem
     27    IPaymentGatewayService, IPaymentItem, IPaymentGatewayServicesLister,
    2828    )
    2929from waeup.ikoba.payments.payment import (
    3030    Payment, get_payment_providers, PaymentItem,
    3131    )
     32from waeup.ikoba.testing import (FunctionalLayer, FunctionalTestCase)
    3233
    3334
     
    5960        assert result.keys() == ['some_name', ]
    6061        assert result['some_name'] is fake_util
     62
     63class FunctionalHelperTests(FunctionalTestCase):
     64
     65    layer = FunctionalLayer
     66
     67    def test_services_lister_is_registered(self):
     68        # a lister of gateway services is registered on startup
     69        util = queryUtility(IPaymentGatewayServicesLister)
     70        assert util is not None
    6171
    6272
Note: See TracChangeset for help on using the changeset viewer.