Skip to content

Commit

Permalink
Fix imports in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
raphaelm committed Jan 10, 2024
1 parent 21d8d93 commit eb8e36e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/tests/plugins/stripe/test_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
from django.test import RequestFactory
from django.utils.timezone import now
from django_scopes import scope
from stripe.error import APIConnectionError, CardError
from stripe import error

from pretix.base.models import Event, Order, OrderRefund, Organizer
from pretix.base.payment import PaymentException
Expand Down Expand Up @@ -178,7 +178,7 @@ def test_perform_card_error(env, factory, monkeypatch):
event, order = env

def paymentintent_create(**kwargs):
raise CardError(message='Foo', param='foo', code=100)
raise error.CardError(message='Foo', param='foo', code=100)

monkeypatch.setattr("stripe.PaymentIntent.create", paymentintent_create)
prov = StripeCC(event)
Expand All @@ -204,7 +204,7 @@ def test_perform_stripe_error(env, factory, monkeypatch):
event, order = env

def paymentintent_create(**kwargs):
raise CardError(message='Foo', param='foo', code=100)
raise error.CardError(message='Foo', param='foo', code=100)

monkeypatch.setattr("stripe.PaymentIntent.create", paymentintent_create)
prov = StripeCC(event)
Expand Down Expand Up @@ -296,7 +296,7 @@ def test_refund_unavailable(env, factory, monkeypatch):

def charge_retr(*args, **kwargs):
def refund_create(amount):
raise APIConnectionError(message='Foo')
raise error.APIConnectionError(message='Foo')

c = MockedCharge()
c.refunds.create = refund_create
Expand Down

0 comments on commit eb8e36e

Please sign in to comment.