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

Commit

Permalink
Rename BalancedHarness to BillingHarness
Browse files Browse the repository at this point in the history
  • Loading branch information
rohitpaulk committed May 9, 2015
1 parent 40bbf50 commit c08df86
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
8 changes: 4 additions & 4 deletions gratipay/testing/balanced.py → gratipay/testing/billing.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from gratipay.testing.vcr import use_cassette


class BalancedHarness(Harness):
class BillingHarness(Harness):

def setUp(self):
self.david = self.make_participant('david', is_suspicious=False,
Expand All @@ -26,7 +26,7 @@ def setUp(self):

@classmethod
def setUpClass(cls):
with use_cassette('BalancedHarness'):
with use_cassette('BillingHarness'):
balanced.configure(balanced.APIKey().save().secret)
mp = balanced.Marketplace.my_marketplace
if not mp:
Expand Down Expand Up @@ -65,7 +65,7 @@ def setUpClass(cls):
cls.bank_account.associate_to_customer(cls.homer_href)
cls.bank_account_href = unicode(cls.bank_account.href)

super(BalancedHarness, cls).setUpClass()
super(BillingHarness, cls).setUpClass()

@classmethod
def tearDownClass(cls):
Expand All @@ -75,7 +75,7 @@ def tearDownClass(cls):
for t in itertools.chain(credits, debits):
t.meta.pop('exchange_id')
t.save()
super(BalancedHarness, cls).tearDownClass()
super(BillingHarness, cls).tearDownClass()



8 changes: 4 additions & 4 deletions tests/py/test_billing_exchanges.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
from gratipay.models.exchange_route import ExchangeRoute
from gratipay.models.participant import Participant
from gratipay.testing import Foobar, Harness
from gratipay.testing.balanced import BalancedHarness
from gratipay.testing.billing import BillingHarness


class TestCredits(BalancedHarness):
class TestCredits(BillingHarness):

def test_ach_credit_withhold(self):
self.make_exchange('balanced-cc', 27, 0, self.homer)
Expand Down Expand Up @@ -61,7 +61,7 @@ def test_ach_credit_invalidated_bank_account(self):
assert error == 'No bank account'


class TestCardHolds(BalancedHarness):
class TestCardHolds(BillingHarness):

def test_create_card_hold_for_suspicious_raises_NotWhitelisted(self):
bob = self.make_participant('bob', is_suspicious=True,
Expand Down Expand Up @@ -335,7 +335,7 @@ def test_record_exchange_result_updates_balance_for_positive_amounts(self):
assert alice.balance == D('35.59')


class TestSyncWithBalanced(BalancedHarness):
class TestSyncWithBalanced(BillingHarness):

def test_sync_with_balanced(self):
with mock.patch('gratipay.billing.exchanges.record_exchange_result') as rer:
Expand Down
6 changes: 3 additions & 3 deletions tests/py/test_billing_payday.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
from gratipay.exceptions import NegativeBalance
from gratipay.models.participant import Participant
from gratipay.testing import Foobar, Harness
from gratipay.testing.balanced import BalancedHarness
from gratipay.testing.billing import BillingHarness
from gratipay.testing.emails import EmailHarness


class TestPayday(BalancedHarness):
class TestPayday(BillingHarness):

@mock.patch.object(Payday, 'fetch_card_holds')
def test_payday_moves_money(self, fch):
Expand Down Expand Up @@ -253,7 +253,7 @@ def test_payday(self, payin, log):
assert payin.call_count == 1


class TestPayin(BalancedHarness):
class TestPayin(BillingHarness):

def create_card_holds(self):
payday = Payday.start()
Expand Down
4 changes: 2 additions & 2 deletions tests/py/test_routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
import balanced
import mock

from gratipay.testing.balanced import BalancedHarness
from gratipay.testing.billing import BillingHarness
from gratipay.models.exchange_route import ExchangeRoute
from gratipay.models.participant import Participant


class TestRoutes(BalancedHarness):
class TestRoutes(BillingHarness):

def hit(self, username, action, network, address, expected=200):
r = self.client.POST('/%s/routes/%s.json' % (username, action),
Expand Down

0 comments on commit c08df86

Please sign in to comment.