This repository has been archived by the owner on Feb 8, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 308
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Factor set_paypal_address out of endpoint
- Loading branch information
1 parent
ed9ca00
commit 56c616c
Showing
4 changed files
with
45 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,3 +25,22 @@ def test_scopes_to_cursor(self): | |
assert alice.get_payout_routes() == [] | ||
assert alice.get_payout_routes(cursor=cursor) == [route] | ||
assert alice.get_payout_routes() == [route] | ||
|
||
|
||
class SetPayPalAddress(Harness): | ||
|
||
def test_sets_paypal_address(self): | ||
alice = self.make_participant('alice', claimed_time='now') | ||
self.add_and_verify_email(alice, '[email protected]') | ||
alice.set_paypal_address('[email protected]') | ||
paypal = alice.get_payout_routes()[0] | ||
assert paypal.network == 'paypal' | ||
assert paypal.address == '[email protected]' | ||
|
||
def test_scopes_to_cursor(self): | ||
alice = self.make_participant('alice', claimed_time='now') | ||
self.add_and_verify_email(alice, '[email protected]') | ||
with self.db.get_cursor() as cursor: | ||
alice.set_paypal_address('[email protected]', cursor) | ||
assert alice.get_payout_routes() == [] | ||
assert alice.get_payout_routes(cursor=cursor)[0].address == '[email protected]' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters