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
1 parent
eddad56
commit 6b30b0d
Showing
3 changed files
with
47 additions
and
6 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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
from gratipay.testing import Harness | ||
|
||
|
||
class Tests(Harness): | ||
|
||
def setUp(self): | ||
self.alice = self.make_participant('alice', claimed_time='now', is_admin=True) | ||
self.bob = self.make_participant('bob', claimed_time='now') | ||
|
||
|
||
# il - identities listing | ||
|
||
def test_il_is_403_for_anon(self): | ||
assert self.client.GxT('/~bob/identities/').code == 403 | ||
|
||
def test_il_is_403_for_non_admin(self): | ||
assert self.client.GxT('/~bob/identities/').code == 403 | ||
|
||
def test_il_is_200_for_self(self): | ||
assert self.client.GET('/~bob/identities/', auth_as='alice').code == 200 | ||
|
||
def test_il_is_200_for_admin(self): | ||
assert self.client.GET('/~bob/identities/', auth_as='alice').code == 200 | ||
|
||
|
||
# ip - identity page | ||
|
||
def test_ip_is_403_for_anon(self): | ||
assert self.client.GxT('/~bob/identities/TT').code == 403 | ||
|
||
def test_ip_is_403_for_non_admin(self): | ||
assert self.client.GxT('/~bob/identities/TT').code == 403 | ||
|
||
def test_ip_is_200_for_self(self): | ||
assert self.client.GET('/~bob/identities/TT', auth_as='alice').code == 200 | ||
|
||
def test_ip_is_200_for_admin(self): | ||
assert self.client.GET('/~bob/identities/TT', auth_as='alice').code == 200 | ||
|
||
def test_ip_(self): | ||
pass |
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