From 3dcacf881f6c114fb15b174c91e81fd153bb4221 Mon Sep 17 00:00:00 2001 From: Raymond Yee Date: Tue, 3 Apr 2012 07:08:05 -0700 Subject: [PATCH] Add a function to fire off a successful_campaign signal --- test/campaigntest.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/test/campaigntest.py b/test/campaigntest.py index f3f84cc8..5633ac0f 100644 --- a/test/campaigntest.py +++ b/test/campaigntest.py @@ -309,7 +309,14 @@ def support_campaign(do_local=True): yield sel #sel.quit() - +def successful_campaign_signal(): + """fire off a success_campaign signal and send notifications""" + import regluit + from notification.engine import send_all + c = regluit.core.models.Campaign.objects.get(id=3) + regluit.core.signals.successful_campaign.send(sender=None, campaign=c) + send_all() + def berkeley_search(): sel = webdriver.Firefox()