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#820b3cbc-e2e2-440e-9cec-7958725e8f52',
                'name': 'Sérgio R Siqueira',
                'email': 'sergio@somosbeta.com.br',
                'user_id': '6c992e55-f483-44ce-a940-5394c3e00645',
            }
        }
    }
    assert app.lambda_handler(event, lambda_context)  # type: ignore
