From a53adf9f4583cd34a6caa9cebe1aafcf02a8a77e Mon Sep 17 00:00:00 2001 From: Chad Whitacre Date: Wed, 24 Aug 2016 13:35:05 -0400 Subject: [PATCH] Failing test for including team members in grprbn --- gratipay/testing/billing.py | 4 ++-- tests/py/test_billing_exchanges.py | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/gratipay/testing/billing.py b/gratipay/testing/billing.py index 0fce8a769d..e4e9ea65d8 100644 --- a/gratipay/testing/billing.py +++ b/gratipay/testing/billing.py @@ -32,8 +32,8 @@ def setUp(self): braintree_customer_id=self.obama_bt_id) self.obama_route = ExchangeRoute.insert(self.obama, 'braintree-cc', self.obama_cc_token) # A customer with Paypal attached. - self.homer = self.make_participant('homer', is_suspicious=False, - claimed_time='now') + self.homer = self.make_participant('homer', is_suspicious=False, verified_in='US', + claimed_time='now', email_address='abcd@gmail.com') self.homer_route = ExchangeRoute.insert(self.homer, 'paypal', 'abcd@gmail.com') diff --git a/tests/py/test_billing_exchanges.py b/tests/py/test_billing_exchanges.py index 13b8ae5118..a29ccf3c5d 100644 --- a/tests/py/test_billing_exchanges.py +++ b/tests/py/test_billing_exchanges.py @@ -164,6 +164,14 @@ def test_grprbn_includes_team_owners(self): routes = get_ready_payout_routes_by_network(self.db, 'paypal') assert [r.participant.username for r in routes] == ['picard'] + def test_grprbn_includes_team_members(self): + enterprise = self.make_team(is_approved=True, available=50) + enterprise.add_member(self.homer, P('picard')) # add a member + self.obama.set_payment_instruction(enterprise, 100) + self.run_payday() + routes = get_ready_payout_routes_by_network(self.db, 'paypal') + assert [r.participant.username for r in routes] == ['homer', 'picard'] + def test_grprbn_includes_1_0_payouts(self): alice = self.make_participant('alice', balance=24, status_of_1_0_payout='pending-payout') ExchangeRoute.insert(alice, 'paypal', 'alice@example.com')