30 lines
864 B
Python
30 lines
864 B
Python
from aws_lambda_powertools.utilities.typing import LambdaContext
|
|
from layercake.dynamodb import DynamoDBPersistenceLayer, PartitionKey
|
|
|
|
import events.billing.close_window as app
|
|
|
|
|
|
def test_append_enrollment(
|
|
dynamodb_seeds,
|
|
dynamodb_persistence_layer: DynamoDBPersistenceLayer,
|
|
lambda_context: LambdaContext,
|
|
):
|
|
event = {
|
|
'detail': {
|
|
'new_image': {
|
|
'id': 'BILLING#ORG#BES6dmWgTMXRYmfDyYYXUF',
|
|
'sk': 'START#2025-07-01#END#2025-07-31#SCHEDULE#AUTO_CLOSE',
|
|
'created_at': '2025-07-24T15:20:52.464244-03:00',
|
|
'ttl': 1754017200,
|
|
}
|
|
}
|
|
}
|
|
|
|
assert app.lambda_handler(event, lambda_context) # type: ignore
|
|
|
|
# r = dynamodb_persistence_layer.collection.query(
|
|
# PartitionKey('BILLING#ORG#edp8njvgQuzNkLx2ySNfAD')
|
|
# )
|
|
|
|
# print(r)
|