add integration

This commit is contained in:
2025-08-06 18:46:21 -03:00
parent e08f16bbaa
commit ff25ade76e
16 changed files with 314 additions and 132 deletions

View File

@@ -3,16 +3,17 @@ from http import HTTPMethod
from ..conftest import HttpApiProxy, LambdaContext
def test_html_page(
mock_app,
dynamodb_seeds,
def test_html(
app,
seeds,
http_api_proxy: HttpApiProxy,
lambda_context: LambdaContext,
):
r = mock_app.lambda_handler(
r = app.lambda_handler(
http_api_proxy(
raw_path='/login',
method=HTTPMethod.GET,
query_string_parameters={'continue': 'http://localhost'},
),
lambda_context,
)
@@ -21,20 +22,19 @@ def test_html_page(
def test_login(
mock_app,
dynamodb_seeds,
app,
seeds,
http_api_proxy: HttpApiProxy,
lambda_context: LambdaContext,
):
r = mock_app.lambda_handler(
r = app.lambda_handler(
http_api_proxy(
raw_path='/login',
method=HTTPMethod.POST,
headers={
'Content-Type': 'application/x-www-form-urlencoded',
},
body='username=sergio@somosbeta.com.br&password=pytest@123',
is_base64_encoded=False,
body='username=sergio@somosbeta.com.br&password=pytest@123&continue=https://localhost',
),
lambda_context,
)