Skip to content

Commit

Permalink
better names
Browse files Browse the repository at this point in the history
  • Loading branch information
jacoor committed Sep 21, 2017
1 parent 2119e40 commit 6908d5f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions aa_stripe/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from aa_stripe.exceptions import (StripeCouponAlreadyExists, StripeMethodNotAllowed, StripeWebhookAlreadyParsed,
StripeWebhookParseError)
from aa_stripe.settings import stripe_settings
from aa_stripe.signals import charge_completed
from aa_stripe.signals import stripe_charge_completed
from aa_stripe.utils import timestamp_to_timezone_aware_date

USER_MODEL = getattr(settings, "STRIPE_USER_MODEL", settings.AUTH_USER_MODEL)
Expand Down Expand Up @@ -306,7 +306,7 @@ def charge(self):
self.stripe_response = stripe_charge
self.is_charged = True
self.save()
charge_completed.send(sender=StripeCharge, instance=self)
stripe_charge_completed.send(sender=StripeCharge, instance=self)
return stripe_charge


Expand Down
2 changes: 1 addition & 1 deletion aa_stripe/signals.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# -*- coding: utf-8 -*-
import django.dispatch

charge_completed = django.dispatch.Signal(providing_args=["instance"])
stripe_charge_completed = django.dispatch.Signal(providing_args=["instance"])
4 changes: 2 additions & 2 deletions tests/test_charge.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from stripe.error import StripeError

from aa_stripe.models import StripeCharge, StripeCustomer
from aa_stripe.signals import charge_completed
from aa_stripe.signals import stripe_charge_completed

UserModel = get_user_model()

Expand All @@ -25,7 +25,7 @@ def test_charges(self, charge_create_mocked):

def handler(sender, instance, **kwargs):
self.signal_was_called = True
charge_completed.connect(handler)
stripe_charge_completed.connect(handler)

data = {
"customer_id": "cus_AlSWz1ZQw7qG2z",
Expand Down

0 comments on commit 6908d5f

Please sign in to comment.