Fixed seperation in test token
This commit is contained in:
parent
5e7eeb079d
commit
e48fc22513
|
@ -77,7 +77,7 @@ class Request(dict):
|
||||||
|
|
||||||
:return: token related to request
|
:return: token related to request
|
||||||
"""
|
"""
|
||||||
self._token = getattr(self, '_token',
|
self._token = getattr(self, '_token',
|
||||||
self.headers.get('Authorization'))
|
self.headers.get('Authorization'))
|
||||||
return self._token
|
return self._token
|
||||||
|
|
||||||
|
|
|
@ -141,10 +141,10 @@ def test_token():
|
||||||
return text('OK')
|
return text('OK')
|
||||||
|
|
||||||
# uuid4 generated token.
|
# uuid4 generated token.
|
||||||
token = 'a1d895e0-553a-421a-8e22-5ff8ecb48cbf'
|
token = 'Token a1d895e0-553a-421a-8e22-5ff8ecb48cbf'
|
||||||
headers = {
|
headers = {
|
||||||
'content-type': 'application/json',
|
'content-type': 'application/json',
|
||||||
'Authorization': 'Token {}'.format(token)
|
'Authorization': '{}'.format(token)
|
||||||
}
|
}
|
||||||
|
|
||||||
request, response = app.test_client.get('/', headers=headers)
|
request, response = app.test_client.get('/', headers=headers)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user