This commit is contained in:
2025-04-01 19:15:10 -03:00
parent dbe7a924e2
commit ef4bfc07f3
16 changed files with 197 additions and 44 deletions

View File

@@ -5,8 +5,6 @@ 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',
@@ -32,11 +30,7 @@ def test_bearer_jwt(lambda_context: LambdaContext):
}
def test_bearer_apikey(
monkeypatch,
dynamodb_seeds,
lambda_context: LambdaContext,
):
def test_bearer_apikey(dynamodb_seeds, lambda_context: LambdaContext):
event = {
'headers': {
'authorization': 'Bearer sk-MzI1MDQ0NTctZjEzMy00YzAwLTkzNmItNmFhNzEyY2E5ZjQw',