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

Commit

Permalink
Failing tests for #3783
Browse files Browse the repository at this point in the history
  • Loading branch information
chadwhitacre committed Sep 20, 2015
1 parent 970e1dd commit 8109c41
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/py/test_privacy_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,13 @@ def test_admin_can_see_giving_for_non_anonymous_giving(self):
assert '342' in self.client.GET('/~bob/', auth_as='admin').body
assert '[342]' not in self.client.GET('/~bob/', auth_as='admin').body

def test_self_can_see_giving_for_non_anonymous_giving(self):
self.make_participant('bob', claimed_time='now',
giving=10.79, ngiving_to=342, anonymous_giving=False)
assert '10.79' in self.client.GET('/~bob/', auth_as='bob').body.decode('utf8')
assert '342' in self.client.GET('/~bob/', auth_as='bob').body.decode('utf8')
assert '[342]' not in self.client.GET('/~bob/', auth_as='bob').body.decode('utf8')

def test_anon_cannot_see_giving_for_anonymous_giving(self):
self.make_participant('bob', claimed_time='now',
giving=10.79, ngiving_to=342, anonymous_giving=True)
Expand All @@ -99,3 +106,9 @@ def test_admin_can_see_giving_for_anonymous_giving(self):
self.make_participant('admin', is_admin=True)
assert '10.79' in self.client.GET('/~bob/', auth_as='admin').body
assert '[342]' in self.client.GET('/~bob/', auth_as='admin').body

def test_self_can_see_giving_for_anonymous_giving(self):
self.make_participant('bob', claimed_time='now',
giving=10.79, ngiving_to=342, anonymous_giving=True)
assert '10.79' in self.client.GET('/~bob/', auth_as='bob').body.decode('utf8')
assert '[342]' in self.client.GET('/~bob/', auth_as='bob').body.decode('utf8')

0 comments on commit 8109c41

Please sign in to comment.