move seeds dir
This commit is contained in:
27
streams/tests/conftest.py
Normal file
27
streams/tests/conftest.py
Normal file
@@ -0,0 +1,27 @@
|
||||
import json
|
||||
from dataclasses import dataclass
|
||||
|
||||
import pytest
|
||||
|
||||
|
||||
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')
|
||||
Reference in New Issue
Block a user