rename params

This commit is contained in:
2025-03-27 21:35:36 -03:00
parent 5756451738
commit f757334899
12 changed files with 53 additions and 41 deletions

View File

@@ -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': {