Ignore:
Timestamp:
2 Mar 2015, 11:50:46 (10 years ago)
Author:
uli
Message:

Add test.

File:
1 edited

Legend:

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

    r12647 r12651  
    3030        result = service.create_payment(payer, [], payee)
    3131        assert IPayment.providedBy(result)
    32         assert result.gateway_service == u'demo'
     32        assert result.gateway_service == u'demo_creditcard'
    3333        assert result.state == STATE_UNPAID
    3434        assert len(result) == 0  # no items stored
     
    5353        result = service.create_payment(payer, [payment_item], payee)
    5454        assert result.payer_id == payer.payer_id
     55
     56    def test_get_service_by_utility_name(self):
     57        # we can get the demo credit card service by its utility name
     58        from zope.component import queryUtility
     59        service = queryUtility(
     60            IPaymentGatewayService, name="demo_creditcard")
     61        assert service is not None
Note: See TracChangeset for help on using the changeset viewer.