20 lines
612 B
Python
20 lines
612 B
Python
from aws_lambda_powertools.utilities.typing.lambda_context import LambdaContext
|
|
|
|
import events.send_forgot_email as app
|
|
|
|
|
|
def test_send_forgot_email(monkeypatch, lambda_context: LambdaContext):
|
|
monkeypatch.setattr(app.sesv2_client, 'send_email', lambda *args, **kwargs: ...)
|
|
|
|
event = {
|
|
'detail': {
|
|
'new_image': {
|
|
'id': 'PASSWORD_RESET',
|
|
'sk': 'CODE#123',
|
|
'name': 'Sérgio R Siqueira',
|
|
'email': 'sergio@somosbeta.com.br',
|
|
}
|
|
}
|
|
}
|
|
assert app.lambda_handler(event, lambda_context) # type: ignore
|