Added a method to drop all the transactions to help with testing

pull/1/head
Raymond Yee 2011-12-21 14:25:21 -05:00
parent 4c9bf21ce8
commit 4098933cf6
1 changed files with 3 additions and 0 deletions

View File

@ -30,6 +30,9 @@ def execute_campaigns(clist):
def finish_campaigns(clist):
return [pm.finish_campaign(c) for c in clist]
def drop_all_transactions():
Transaction.objects.all().delete()
# by the time we've executed a campaign, we should have r.status = 'COMPLETED' for primary but None for secondary
# [[[r.status for r in t.receiver_set.all()] for t in c.transaction_set.all()] for c in campaigns_incomplete()]