Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

make tests work in isolation by removing and replacing all signals

  • Loading branch information...
commit 8f589763afd7a227c7bc5d24709acfb7777ff549 1 parent 8e4d940
@jasonculverhouse jasonculverhouse authored
Showing with 29 additions and 0 deletions.
  1. +29 −0 paypal/standard/ipn/tests/test_ipn.py
View
29 paypal/standard/ipn/tests/test_ipn.py
@@ -56,10 +56,39 @@ def setUp(self):
# Monkey patch over PayPalIPN to make it get a VERFIED response.
self.old_postback = PayPalIPN._postback
PayPalIPN._postback = lambda self: "VERIFIED"
+
+ self.payment_was_successful_receivers = payment_was_successful.receivers
+ self.payment_was_flagged_receivers = payment_was_flagged.receivers
+ self.recurring_skipped_receivers = recurring_skipped.receivers
+ self.recurring_failed_receivers = recurring_failed.receivers
+ self.recurring_create_receivers = recurring_create.receivers
+ self.recurring_failed_receivers = recurring_failed.receivers
+ self.recurring_payment_receivers = recurring_payment.receivers
+ self.recurring_cancel_receivers = recurring_cancel.receivers
+
+ payment_was_successful.receivers = []
+ payment_was_flagged.receivers = []
+ recurring_skipped.receivers = []
+ recurring_failed.receivers = []
+ recurring_create.receivers = []
+ recurring_failed.receivers = []
+ recurring_payment.receivers = []
+ recurring_cancel.receivers = []
+
def tearDown(self):
settings.DEBUG = self.old_debug
PayPalIPN._postback = self.old_postback
+
+ payment_was_successful.receivers =self.payment_was_successful_receivers
+ payment_was_flagged.receivers = self.payment_was_flagged_receivers
+ recurring_skipped.receivers = self.recurring_skipped_receivers
+ recurring_failed.receivers = self.recurring_failed_receivers
+ recurring_create.receivers = self.recurring_create_receivers
+ recurring_failed.receivers = self.recurring_failed_receivers
@poswald
poswald added a note

Why is recurring_failed.receivers in here twice? That's just a typo right?

@dcramer Owner
dcramer added a note

Looks like it's just a typo

I fixed this I'm my clone and issued a pull request, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+ recurring_payment.receivers = self.recurring_payment_receivers
+ recurring_cancel.receivers = self.recurring_cancel_receivers
+
def assertGotSignal(self, signal, flagged, params=IPN_POST_PARAMS):
# Check the signal was sent. These get lost if they don't reference self.
Please sign in to comment.
Something went wrong with that request. Please try again.