add sample
This commit is contained in:
@@ -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'},
|
||||
|
||||
Reference in New Issue
Block a user