Skip to content

Commit

Permalink
update tests to reflect the change back from Http404 to PermissionDenied
Browse files Browse the repository at this point in the history
  • Loading branch information
biyeun committed Feb 14, 2014
1 parent 9d61f50 commit a0044e0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions django_prbac/tests/test_decorators.py
Expand Up @@ -3,7 +3,7 @@

# Django imports
from django.test import TestCase
from django.http import HttpRequest, Http404
from django.http import HttpRequest

# Local imports
from django_prbac.decorators import requires_privilege
Expand All @@ -25,7 +25,7 @@ def view(request, *args, **kwargs):
pass

request = HttpRequest()
with self.assertRaises(Http404):
with self.assertRaises(PermissionDenied):
view(request)

def test_requires_privilege_no_such(self):
Expand All @@ -41,7 +41,7 @@ def view(request, *args, **kwargs):
requestor_role = arbitrary.role()
request = HttpRequest()
request.role = requestor_role
with self.assertRaises(Http404):
with self.assertRaises(PermissionDenied):
view(request)

def test_requires_privilege_denied(self):
Expand All @@ -59,7 +59,7 @@ def view(request, *args, **kwargs):

request = HttpRequest()
request.role = requestor_role.instantiate({})
with self.assertRaises(Http404):
with self.assertRaises(PermissionDenied):
view(request)


Expand All @@ -74,7 +74,7 @@ def view(request, *args, **kwargs):

request = HttpRequest()
request.role = requestor_role.instantiate({})
with self.assertRaises(Http404):
with self.assertRaises(PermissionDenied):
view(request)

def test_requires_privilege_ok(self):
Expand Down

0 comments on commit a0044e0

Please sign in to comment.