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

Commit

Permalink
Check methods, with test
Browse files Browse the repository at this point in the history
  • Loading branch information
chadwhitacre committed May 12, 2016
1 parent e10b9c4 commit 5d8c512
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/py/test_identity_pages.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ def test_il_is_200_for_admin(self):

# ip - identity page

def test_ip_disallows_methods(self):
assert self.client.hxt('HEAD', '/~bob/identities/TT').code == 405

def test_ip_is_403_for_anon(self):
assert self.client.GxT('/~bob/identities/TT').code == 403

Expand Down
1 change: 1 addition & 0 deletions www/~/%username/identities/%country.spt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ from aspen import Response
from gratipay.utils import get_participant
from gratipay.models.country import Country
[---]
request.allow('GET', 'POST')
participant = get_participant(state, restrict=True)

# hard-code HR auth group for Team Gratipay O.O
Expand Down

0 comments on commit 5d8c512

Please sign in to comment.