Commit 1202e6b8 by Tim Babych

add test for user not passed in the request

parent 2df9c9aa
...@@ -575,6 +575,13 @@ class TokenTests(BaseAnnotationViewTests): ...@@ -575,6 +575,13 @@ class TokenTests(BaseAnnotationViewTests):
token = jwt.encode(token, settings.CLIENT_SECRET) token = jwt.encode(token, settings.CLIENT_SECRET)
self._assert_403(token) self._assert_403(token)
def test_no_user(self):
"""
403 when user is not present in request
"""
del self.headers['user']
self._assert_403(jwt.encode(self.token_data, settings.CLIENT_SECRET))
def test_wrong_secret(self): def test_wrong_secret(self):
""" """
403 when token is signed by wrong secret 403 when token is signed by wrong secret
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment