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

Commit

Permalink
Correct compute_actual_takes test to actually test
Browse files Browse the repository at this point in the history
  • Loading branch information
chadwhitacre committed Jul 20, 2016
1 parent c699334 commit ba81708
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions tests/py/test_team_takes.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,16 +197,17 @@ def test_cat_computes_actual_takes(self):
self.enterprise.set_take_for(self.crusher, PENNY * 80, self.crusher)
self.enterprise.set_take_for(self.bruiser, PENNY, self.picard)
self.enterprise.set_take_for(self.bruiser, PENNY * 30, self.bruiser)

takes = self.enterprise.compute_actual_takes()

assert tuple(takes) == (self.bruiser.id, self.crusher.id)

takes[self.bruiser.id]['actual_amount'] = PENNY * 30
takes[self.bruiser.id]['nominal_amount'] = PENNY * 30
takes[self.bruiser.id]['balance'] = PENNY * 70
takes[self.bruiser.id]['percentage'] = D('0.3')
assert takes[self.bruiser.id]['actual_amount'] == PENNY * 30
assert takes[self.bruiser.id]['nominal_amount'] == PENNY * 30
assert takes[self.bruiser.id]['balance'] == PENNY * 70
assert takes[self.bruiser.id]['percentage'] == D('0.3')

takes[self.crusher.id]['actual_amount'] = PENNY * 70
takes[self.crusher.id]['nominal_amount'] = PENNY * 80
takes[self.crusher.id]['balance'] = ZERO
takes[self.crusher.id]['percentage'] = D('0.7')
assert takes[self.crusher.id]['actual_amount'] == PENNY * 70
assert takes[self.crusher.id]['nominal_amount'] == PENNY * 80
assert takes[self.crusher.id]['balance'] == ZERO
assert takes[self.crusher.id]['percentage'] == D('0.7')

0 comments on commit ba81708

Please sign in to comment.