add forgot endpoint
This commit is contained in:
0
id.saladeaula.digital/tests/events/__init__.py
Normal file
0
id.saladeaula.digital/tests/events/__init__.py
Normal file
19
id.saladeaula.digital/tests/events/test_send_forgot_email.py
Normal file
19
id.saladeaula.digital/tests/events/test_send_forgot_email.py
Normal file
@@ -0,0 +1,19 @@
|
||||
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
|
||||
Reference in New Issue
Block a user