43 lines
1.1 KiB
Python
43 lines
1.1 KiB
Python
from aws_lambda_powertools.utilities.typing import LambdaContext
|
|
from layercake.dynamodb import DynamoDBPersistenceLayer
|
|
|
|
import events.start_fulfillment as app
|
|
|
|
|
|
def test_fulfillment_enrollments(
|
|
dynamodb_seeds,
|
|
dynamodb_persistence_layer: DynamoDBPersistenceLayer,
|
|
lambda_context: LambdaContext,
|
|
):
|
|
event = {
|
|
'detail': {
|
|
'new_image': {
|
|
'id': '9b9441d2-4ae3-4b50-8cb6-71e872d4492a',
|
|
'sk': 'FULFILLMENT',
|
|
'org_id': 'cJtK9SsnJhKPyxESe7g3DG',
|
|
'status': 'IN_PROGRESS',
|
|
}
|
|
}
|
|
}
|
|
|
|
assert app.lambda_handler(event, lambda_context) # type: ignore
|
|
|
|
|
|
def test_fulfillment_items(
|
|
dynamodb_seeds,
|
|
dynamodb_persistence_layer: DynamoDBPersistenceLayer,
|
|
lambda_context: LambdaContext,
|
|
):
|
|
event = {
|
|
'detail': {
|
|
'new_image': {
|
|
'id': '9f7fa055-7c0b-418a-b023-77477d1895b9',
|
|
'sk': 'FULFILLMENT',
|
|
'org_id': 'cJtK9SsnJhKPyxESe7g3DG',
|
|
'status': 'IN_PROGRESS',
|
|
}
|
|
}
|
|
}
|
|
|
|
assert app.lambda_handler(event, lambda_context) # type: ignore
|