This repository has been archived by the owner on Feb 8, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 308
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
9 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -283,7 +283,6 @@ def test_cpi_clears_personal_information(self, mailer): | |
, goal=100 | ||
, anonymous_giving=True | ||
, anonymous_receiving=True | ||
, number='plural' | ||
, avatar_url='img-url' | ||
, email_address='[email protected]' | ||
, claimed_time='now' | ||
|
@@ -294,7 +293,6 @@ def test_cpi_clears_personal_information(self, mailer): | |
, receiving=40 | ||
, npatrons=21 | ||
) | ||
assert Participant.from_username('alice').number == 'plural' # sanity check | ||
alice.add_email('[email protected]') | ||
|
||
with self.db.get_cursor() as cursor: | ||
|
@@ -303,8 +301,8 @@ def test_cpi_clears_personal_information(self, mailer): | |
|
||
assert alice.statement == new_alice.statement == '' | ||
assert alice.goal == new_alice.goal == None | ||
assert (alice.anonymous_giving, new_alice.anonymous_giving) == (False, False) | ||
assert (alice.anonymous_receiving, new_alice.anonymous_giving) == (False, False) | ||
assert alice.anonymous_giving == new_alice.anonymous_giving == False | ||
assert alice.anonymous_receiving == new_alice.anonymous_receiving == False | ||
assert alice.number == new_alice.number == 'singular' | ||
assert alice.avatar_url == new_alice.avatar_url == None | ||
assert alice.email_address == new_alice.email_address == None | ||
|
@@ -317,6 +315,12 @@ def test_cpi_clears_personal_information(self, mailer): | |
assert alice.session_expires.year == new_alice.session_expires.year == date.today().year | ||
assert not alice.get_emails() | ||
|
||
team = self.make_participant('team', number='plural') | ||
with self.db.get_cursor() as cursor: | ||
team.clear_personal_information(cursor) | ||
team2 = Participant.from_username('team') | ||
assert team.number == team2.number == 'singular' | ||
|
||
def test_cpi_clears_communities(self): | ||
alice = self.make_participant('alice') | ||
alice.insert_into_communities(True, 'test', 'test') | ||
|