move cli
This commit is contained in:
@@ -40,18 +40,27 @@ def test_bearer_apikey(
|
||||
|
||||
event = {
|
||||
'headers': {
|
||||
'authorization': 'Bearer sk-32504457-f133-4c00-936b-6aa712ca9f40',
|
||||
'authorization': 'Bearer sk-MzI1MDQ0NTctZjEzMy00YzAwLTkzNmItNmFhNzEyY2E5ZjQw',
|
||||
}
|
||||
}
|
||||
# This data was added from seeds
|
||||
assert app.lambda_handler(event, lambda_context) == {
|
||||
'isAuthorized': True,
|
||||
'context': {'tenant': {'name': 'default', 'id': '*'}},
|
||||
'context': {
|
||||
'tenant': {
|
||||
'name': 'default',
|
||||
'id': '*',
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
# This data was added from seeds
|
||||
assert app.lambda_handler(
|
||||
{'headers': {'authorization': 'Bearer sk-abc'}},
|
||||
{
|
||||
'headers': {
|
||||
'authorization': 'Bearer sk-abc',
|
||||
}
|
||||
},
|
||||
lambda_context,
|
||||
) == {'isAuthorized': False}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user