31 lines
963 B
Python
31 lines
963 B
Python
import app.events.reenroll_if_failed as app
|
|
from aws_lambda_powertools.utilities.typing import LambdaContext
|
|
from layercake.dynamodb import DynamoDBPersistenceLayer
|
|
|
|
|
|
def test_reenroll(
|
|
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)
|