add server to gen pdf

This commit is contained in:
2025-07-28 21:43:29 -03:00
parent 369bdc9db3
commit c6e8978dcc
14 changed files with 174 additions and 297 deletions

View File

@@ -1,10 +1,14 @@
from aws_lambda_powertools.utilities.typing import LambdaContext
from layercake.dynamodb import DynamoDBPersistenceLayer, PartitionKey
from layercake.dynamodb import (
DynamoDBPersistenceLayer,
SortKey,
TransactKey,
)
import events.billing.close_window as app
def test_append_enrollment(
def test_close_window(
dynamodb_seeds,
dynamodb_persistence_layer: DynamoDBPersistenceLayer,
lambda_context: LambdaContext,
@@ -22,8 +26,15 @@ def test_append_enrollment(
assert app.lambda_handler(event, lambda_context) # type: ignore
# r = dynamodb_persistence_layer.collection.query(
# PartitionKey('BILLING#ORG#edp8njvgQuzNkLx2ySNfAD')
# r = dynamodb_persistence_layer.collection.get_items(
# TransactKey('BILLING#ORG#BES6dmWgTMXRYmfDyYYXUF')
# + SortKey('START#2025-07-01#END#2025-07-31')
# + SortKey('START#2025-07-01#END#2025-07-31#SCHEDULE#AUTO_CLOSE#EXECUTED'),
# flatten_top=False,
# )
# print(r)
# assert 's3_uri' in r['START#2025-07-01#END#2025-07-31']
# assert 'created_at' in r['START#2025-07-01#END#2025-07-31']
# assert 'updated_at' in r['START#2025-07-01#END#2025-07-31']
# assert r['START#2025-07-01#END#2025-07-31']['status'] == 'CLOSED'
# assert 'START#2025-07-01#END#2025-07-31#SCHEDULE#AUTO_CLOSE#EXECUTED' in r