rename params
This commit is contained in:
@@ -5,6 +5,8 @@ from .conftest import LambdaContext
|
||||
|
||||
|
||||
def test_bearer_jwt(lambda_context: LambdaContext):
|
||||
import auth as app
|
||||
|
||||
# You should mock the Cognito user to pass the test
|
||||
app.get_user = lambda *args, **kwargs: {
|
||||
'sub': '58efed8d-d276-41a8-8502-4ab8b5a6415e',
|
||||
@@ -30,6 +32,7 @@ def test_bearer_jwt(lambda_context: LambdaContext):
|
||||
|
||||
|
||||
def test_bearer_apikey(
|
||||
monkeypatch,
|
||||
dynamodb_seeds,
|
||||
lambda_context: LambdaContext,
|
||||
):
|
||||
@@ -38,6 +41,7 @@ def test_bearer_apikey(
|
||||
'authorization': 'Bearer sk-MzI1MDQ0NTctZjEzMy00YzAwLTkzNmItNmFhNzEyY2E5ZjQw',
|
||||
}
|
||||
}
|
||||
|
||||
# This data was added from seeds
|
||||
assert app.lambda_handler(event, lambda_context) == {
|
||||
'isAuthorized': True,
|
||||
@@ -49,7 +53,7 @@ def test_bearer_apikey(
|
||||
},
|
||||
}
|
||||
|
||||
# This data was added from seeds
|
||||
# # This data was added from seeds
|
||||
assert app.lambda_handler(
|
||||
{
|
||||
'headers': {
|
||||
|
||||
Reference in New Issue
Block a user