add sample

This commit is contained in:
2025-03-25 22:43:34 -03:00
parent 02f0b317ae
commit e1eae86aa1
24 changed files with 603 additions and 51 deletions

View File

@@ -4,13 +4,11 @@ import os
from dataclasses import dataclass
from http import HTTPMethod
import boto3
import layercake.jsonl as jsonl
import pytest
from layercake.dynamodb import DynamoDBPersistenceLayer
PYTEST_TABLE_NAME = 'pytest'
DYNAMODB_ENDPOINT_URL = 'http://127.0.0.1:8000'
PK = os.getenv('DYNAMODB_PARTITION_KEY', 'pk')
SK = os.getenv('DYNAMODB_SORT_KEY', 'sk')
@@ -102,7 +100,8 @@ def http_api_proxy():
@pytest.fixture
def dynamodb_client():
client = boto3.client('dynamodb', endpoint_url=DYNAMODB_ENDPOINT_URL)
from boto3clients import dynamodb_client as client
client.create_table(
AttributeDefinitions=[
{'AttributeName': PK, 'AttributeType': 'S'},