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.
Add tests for vetting during set_take_for
- Loading branch information
1 parent
b979dc2
commit 023e447
Showing
2 changed files
with
44 additions
and
2 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 |
---|---|---|
|
@@ -123,6 +123,48 @@ def test_stf_doesnt_let_anyone_set_a_take_who_is_not_already_on_the_team_even_to | |
assert actual == 'can only set take if already a member of the team' | ||
|
||
|
||
def test_stf_vets_participant_for_suspiciousness(self): | ||
mallory = self.make_participant('mallory', is_suspicious=True) | ||
actual = self.err(mallory, 0, self.picard) | ||
assert actual == 'user must not be flagged as suspicious' | ||
|
||
def test_stf_vets_participant_for_email(self): | ||
mallory = self.make_participant('mallory') | ||
actual = self.err(mallory, 0, self.picard) | ||
assert actual == 'user must have added at least one email address' | ||
|
||
def test_stf_vets_participant_for_verified_identity(self): | ||
mallory = self.make_participant('mallory', email_address='[email protected]') | ||
actual = self.err(mallory, 0, self.picard) | ||
assert actual == 'user must have a verified identity' | ||
|
||
def test_stf_vets_participant_for_claimed(self): | ||
mallory = self.make_participant('mallory', email_address='[email protected]', verified_in='TT') | ||
actual = self.err(mallory, 0, self.picard) | ||
assert actual == 'user must have claimed the account' | ||
|
||
|
||
def test_stf_vets_recorder_for_suspiciousness(self): | ||
mallory = self.make_participant('mallory', is_suspicious=True) | ||
actual = self.err(self.crusher, 0, mallory) | ||
assert actual == 'user must not be flagged as suspicious' | ||
|
||
def test_stf_vets_recorder_for_email(self): | ||
mallory = self.make_participant('mallory') | ||
actual = self.err(self.crusher, 0, mallory) | ||
assert actual == 'user must have added at least one email address' | ||
|
||
def test_stf_vets_recorder_for_verified_identity(self): | ||
mallory = self.make_participant('mallory', email_address='[email protected]') | ||
actual = self.err(self.crusher, 0, mallory) | ||
assert actual == 'user must have a verified identity' | ||
|
||
def test_stf_vets_recorder_for_claimed(self): | ||
mallory = self.make_participant('mallory', email_address='[email protected]', verified_in='TT') | ||
actual = self.err(self.crusher, 0, mallory) | ||
assert actual == 'user must have claimed the account' | ||
|
||
|
||
# gtlwf - get_take_last_week_for | ||
|
||
def test_gtlwf_gets_take_last_week_for_someone(self): | ||
|