add missing files

This commit is contained in:
2025-07-02 21:59:03 -03:00
parent 3bea74c420
commit b7499f58a3
16 changed files with 1755 additions and 1 deletions

View File

@@ -0,0 +1,34 @@
import json
import os
from dataclasses import dataclass
import pytest
# https://docs.pytest.org/en/7.1.x/reference/reference.html#pytest.hookspec.pytest_configure
def pytest_configure():
os.environ['TZ'] = 'America/Sao_Paulo'
os.environ['MEILISEARCH_HOST'] = 'http://127.0.0.1:7700'
def load_jsonfile(path: str) -> dict:
with open(path) as fp:
return json.load(fp)
@dataclass
class LambdaContext:
function_name: str = 'test'
memory_limit_in_mb: int = 128
invoked_function_arn: str = 'arn:aws:lambda:eu-west-1:809313241:function:test'
aws_request_id: str = '52fdfc07-2182-154f-163f-5f0f9a621d72'
@pytest.fixture
def lambda_context() -> LambdaContext:
return LambdaContext()
@pytest.fixture
def dynamodb_stream_event():
return load_jsonfile('tests/samples/dynamodb_stream_event.json')