add tests to canceled enrollment or scheduled with seat

This commit is contained in:
2026-01-26 13:00:36 -03:00
parent 3e080a2d21
commit 2d191c5fc8
14 changed files with 176 additions and 13 deletions

View File

@@ -1,4 +1,5 @@
from datetime import datetime
from uuid import uuid4
from aws_lambda_powertools import Logger
from aws_lambda_powertools.utilities.data_classes import (
@@ -37,8 +38,9 @@ def lambda_handler(event: EventBridgeEvent, context: LambdaContext) -> bool:
offset_days = old_image.get('dedup_window_offset_days')
billing_day = old_image.get('subscription_billing_day')
created_by = old_image.get('created_by')
seat: Seat | None = old_image.get('seat')
seat: Seat = old_image.get('seat', {})
enrollment = Enrollment(
id=old_image['enrollment_id'],
course=old_image['course'],
user=old_image['user'],
)