mirror of
https://github.com/graphql-python/graphene-django.git
synced 2025-07-13 17:52:19 +03:00
add more tests without context
This commit is contained in:
parent
320d95333f
commit
bf3078f12e
|
@ -78,3 +78,10 @@ class TestHasPermsDecorator(TestCase):
|
|||
request = TestHasPermsDecorator.check_user_perms_func(None, context=context)
|
||||
self.assertEqual(request.status_code, 403)
|
||||
self.assertEqual(request.content, 'Forbidden. User without access')
|
||||
|
||||
|
||||
def test_user_without_context(self):
|
||||
context = type('Mock', (object,), dict())
|
||||
request = TestHasPermsDecorator.check_user_perms_func(None, context=context)
|
||||
self.assertEqual(request.status_code, 403)
|
||||
self.assertEqual(request.content, 'Forbidden. No context, no access.')
|
||||
|
|
Loading…
Reference in New Issue
Block a user