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.
Allow deleting last elsewhere if email attached
- Loading branch information
1 parent
13f0eff
commit 114f36c
Showing
3 changed files
with
28 additions
and
11 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 |
---|---|---|
|
@@ -19,7 +19,7 @@ | |
) | ||
from gratipay.models.exchange_route import ExchangeRoute | ||
from gratipay.models.participant import ( | ||
LastElsewhere, NeedConfirmation, NonexistingElsewhere, Participant | ||
LastElsewhereAndNoEmail, NeedConfirmation, NonexistingElsewhere, Participant | ||
) | ||
from gratipay.testing import Harness, D,P,T | ||
|
||
|
@@ -69,12 +69,16 @@ def test_comparison(self): | |
assert not (self.alice == None) | ||
|
||
def test_delete_elsewhere_last(self): | ||
with pytest.raises(LastElsewhere): | ||
with pytest.raises(LastElsewhereAndNoEmail): | ||
self.alice.delete_elsewhere('twitter', self.alice.id) | ||
|
||
def test_delete_elsewhere_last_works_if_email_present(self): | ||
self.add_and_verify_email(self.alice, '[email protected]') | ||
self.alice.delete_elsewhere('twitter', self.alice.id) | ||
|
||
def test_delete_elsewhere_last_signin(self): | ||
self.make_elsewhere('bountysource', self.alice.id, 'alice') | ||
with pytest.raises(LastElsewhere): | ||
with pytest.raises(LastElsewhereAndNoEmail): | ||
self.alice.delete_elsewhere('twitter', self.alice.id) | ||
|
||
def test_delete_elsewhere_nonsignin(self): | ||
|
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