[tests][jwt] fixs tests according to abfaf2e1

This commit is contained in:
Maxime Alves LIRMM 2020-10-05 11:17:55 +02:00
parent 1d0d3563cb
commit 1ee5da1588
1 changed files with 4 additions and 4 deletions

View File

@ -54,7 +54,7 @@ def token():
def token_builder(): def token_builder():
yield jwt.encode({ yield jwt.encode({
'name':'xxx', 'name':'xxx',
'id': str(uuid4())}, 'user_id': str(uuid4())},
key=SECRET key=SECRET
) )
@ -62,7 +62,7 @@ def token_builder():
def token_debug_false_builder(): def token_debug_false_builder():
yield jwt.encode({ yield jwt.encode({
'name':'xxx', 'name':'xxx',
'id': str(uuid4()), 'user_id': str(uuid4()),
'debug': False}, 'debug': False},
key=SECRET key=SECRET
) )
@ -72,7 +72,7 @@ def token_debug_false_builder():
def token_debug_true_builder(): def token_debug_true_builder():
yield jwt.encode({ yield jwt.encode({
'name':'xxx', 'name':'xxx',
'id': str(uuid4()), 'user_id': str(uuid4()),
'debug': True}, 'debug': True},
key=SECRET key=SECRET
) )
@ -114,7 +114,7 @@ def test_token(token):
raise Exception('Malformed response from /user request') raise Exception('Malformed response from /user request')
assert 'user' in res.keys() assert 'user' in res.keys()
assert 'id' in res['user'].keys() assert 'user_id' in res['user'].keys()
assert 'token' in res['user'].keys() assert 'token' in res['user'].keys()
assert 'payload' in res['user'].keys() assert 'payload' in res['user'].keys()