Skip to content
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.

Commit

Permalink
failing test for #1853
Browse files Browse the repository at this point in the history
  • Loading branch information
Changaco committed Jul 29, 2014
1 parent fcbf948 commit 7fbbb78
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/py/test_billing_payday.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,23 @@ def test_transfer_takes(self):
else:
assert p.balance == 0

def test_take_over_during_payin(self):
alice = self.make_participant('alice', claimed_time='now', balance=50)
bob = self.make_participant('bob', claimed_time='now', elsewhere='twitter')
alice.set_tip_to(bob, 18)
payday = Payday.start()
with self.db.get_cursor() as cursor:
payday.prepare(cursor, payday.ts_start)
bruce = self.make_participant('bruce', claimed_time='now')
bruce.take_over(('twitter', str(bob.id)), have_confirmation=True)
payday.transfer_tips(cursor)
billy = self.make_participant('billy', claimed_time='now')
billy.take_over(('github', str(bruce.id)), have_confirmation=True)
payday.update_balances(cursor)
assert Participant.from_id(bob.id).balance == 0
assert Participant.from_id(bruce.id).balance == 0
assert Participant.from_id(billy.id).balance == 18


class TestPayout(Harness):

Expand Down

0 comments on commit 7fbbb78

Please sign in to comment.