from aws_lambda_powertools.utilities.typing import LambdaContext

import events.ask_to_sign as app


def test_ask_to_sign(
    lambda_context: LambdaContext,
):
    event = {
        'detail': {
            'new_image': {
                'id': 'e249c51b-3e68-42eb-bb4b-20659263ce1c',
                'cert': {
                    's3_uri': 's3://saladeaula.digital/certs/samples/nr11-operador-de-munck.pdf'
                },
                'user': {
                    'id': '5OxmMjL-ujoR5IMGegQz',
                    'name': 'Sérgio R Siqueira',
                    'email': 'sergio@somosbeta.com.br',
                },
            }
        }
    }

    assert app.lambda_handler(event, lambda_context)  # type: ignore
