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

Commit

Permalink
NArrrrrrroooowww
Browse files Browse the repository at this point in the history
  • Loading branch information
chadwhitacre committed Aug 24, 2016
1 parent 336b380 commit b958848
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/py/test_billing_exchanges.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,22 +36,22 @@ def tearDown(self):

# cch - create_card_hold

def test_cch_success(self):
def est_cch_success(self):
self.hold, error = create_card_hold(self.db, self.obama, D('1.00'))
assert isinstance(self.hold, braintree.Transaction)
assert self.hold.status == 'authorized'
assert self.hold.amount == D('10.00')
assert error == ''
assert self.obama.balance == P('obama').balance == 0

def test_cch_for_suspicious_raises_NotWhitelisted(self):
def est_cch_for_suspicious_raises_NotWhitelisted(self):
bob = self.make_participant('bob', is_suspicious=True,
balanced_customer_href='fake_href')
with self.assertRaises(NotWhitelisted):
create_card_hold(self.db, bob, D('1.00'))

@mock.patch('braintree.Transaction.sale')
def test_cch_failure(self, btsale):
def est_cch_failure(self, btsale):
btsale.side_effect = Foobar
self.hold, error = create_card_hold(self.db, self.obama, D('1.00'))
assert self.hold is None
Expand All @@ -64,7 +64,7 @@ def test_cch_failure(self, btsale):
assert self.obama.get_credit_card_error() == 'Foobar()'
assert self.obama.balance == P('obama').balance == 0

def test_cch_bad_card(self):
def est_cch_bad_card(self):
bob = self.make_participant('bob', is_suspicious=False)
customer_id = bob.get_braintree_account().id
result = braintree.PaymentMethod.create({
Expand All @@ -80,7 +80,7 @@ def test_cch_bad_card(self):
assert self.hold is None
assert error.startswith('Invalid Tax Amount')

def test_cch_multiple_cards(self):
def est_cch_multiple_cards(self):
bob = self.make_participant('bob', is_suspicious=False)
customer_id = bob.get_braintree_account().id

Expand All @@ -95,7 +95,7 @@ def test_cch_multiple_cards(self):
self.hold, error = create_card_hold(self.db, bob, D('100.00'))
assert error == ''

def test_cch_no_card(self):
def est_cch_no_card(self):
bob = self.make_participant('bob', is_suspicious=False)
self.hold, error = create_card_hold(self.db, bob, D('10.00'))
assert error == 'No credit card'
Expand Down

0 comments on commit b958848

Please sign in to comment.