wip reenroll

This commit is contained in:
2025-09-11 21:53:08 -03:00
parent ac07ee0101
commit e51964bc8b
13 changed files with 106 additions and 567 deletions

View File

@@ -0,0 +1,30 @@
import app.events.reenroll_if_failed as app
from aws_lambda_powertools.utilities.typing import LambdaContext
from layercake.dynamodb import DynamoDBPersistenceLayer
def test_enroll(
seeds,
dynamodb_persistence_layer: DynamoDBPersistenceLayer,
lambda_context: LambdaContext,
):
event = {
'detail': {
'new_image': {
'id': '294e9864-8284-4287-b153-927b15d90900',
'sk': '0',
'user': {
'id': '2beb8642-aab4-4088-86d4-2966fac7c570',
'name': 'Gary Pihl',
'email': 'gary@boston.com',
'cpf': '83152103000',
},
'course': {
'id': '62bea9b7-971d-4ee8-ab56-942dc7ca6fcd',
'name': 'pytest',
},
}
}
}
enrollment = app.lambda_handler(event, lambda_context) # type: ignore
print(enrollment)