This commit is contained in:
2025-05-16 14:29:14 -03:00
parent 17131380ac
commit cc9bd08daa
49 changed files with 177 additions and 54 deletions

View File

@@ -1,12 +1,12 @@
import base64
import json
import os
from dataclasses import dataclass
from http import HTTPMethod
import json
import os
import jsonlines
import pytest
from layercake.dynamodb import DynamoDBPersistenceLayer
import pytest
PYTEST_TABLE_NAME = 'pytest'
PK = os.getenv('DYNAMODB_PARTITION_KEY')

View File

@@ -1,5 +1,5 @@
import json
from http import HTTPMethod, HTTPStatus
import json
from layercake.dynamodb import (
ComposeKey,

View File

@@ -10,7 +10,6 @@ from layercake.dynamodb import (
from ..conftest import HttpApiProxy, LambdaContext
def test_vacancies(
mock_app,
dynamodb_seeds,

View File

@@ -1,9 +1,8 @@
import json
from http import HTTPMethod, HTTPStatus
import json
from ..conftest import HttpApiProxy, LambdaContext
def test_lookup(
mock_app,
http_api_proxy: HttpApiProxy,

View File

@@ -1,11 +1,10 @@
import json
from http import HTTPMethod, HTTPStatus
import json
from layercake.dynamodb import DynamoDBCollection, DynamoDBPersistenceLayer, KeyPair
from ..conftest import HttpApiProxy, LambdaContext
def test_get_policies(
mock_app,
dynamodb_seeds,

View File

@@ -1,9 +1,8 @@
import json
from http import HTTPMethod, HTTPStatus
import json
from ..conftest import HttpApiProxy, LambdaContext
def test_settings(
mock_app,
dynamodb_seeds,

View File

@@ -1,5 +1,5 @@
import json
from http import HTTPMethod, HTTPStatus
import json
from layercake.dynamodb import (
DynamoDBCollection,
@@ -11,7 +11,6 @@ from layercake.dynamodb import (
from ..conftest import HttpApiProxy, LambdaContext
def test_update_user_cpf(
mock_app,
dynamodb_seeds,

View File

@@ -3,7 +3,6 @@ from auth import _parse_bearer_token
from .conftest import LambdaContext
def test_bearer_jwt(lambda_context: LambdaContext):
# You should mock the Cognito user to pass the test
app.get_user = lambda *args, **kwargs: {

View File

@@ -1,5 +1,5 @@
from conf import KONVIVA_API_URL
import konviva
from settings import KONVIVA_API_URL
def test_konviva_token():

View File

@@ -1,14 +1,12 @@
from http import HTTPMethod
import pytest
from aws_lambda_powertools.event_handler.api_gateway import APIGatewayHttpResolver
from layercake.dynamodb import DynamoDBCollection, DynamoDBPersistenceLayer
from middlewares import AuthenticationMiddleware, TenantMiddleware
import pytest
from .conftest import HttpApiProxy, LambdaContext
@pytest.fixture
def mock_app(dynamodb_persistence_layer: DynamoDBPersistenceLayer):
collect = DynamoDBCollection(dynamodb_persistence_layer)