From e1a854a4ba569a65dac0ea26925d53f1efbbee81 Mon Sep 17 00:00:00 2001 From: Alex Skyrta Date: Thu, 30 Nov 2023 17:49:12 +0200 Subject: [PATCH] addressing CR comments --- src/corva/handlers.py | 1 + tests/unit/test_stream_app.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/corva/handlers.py b/src/corva/handlers.py index 858996ab..05c6bb47 100644 --- a/src/corva/handlers.py +++ b/src/corva/handlers.py @@ -571,6 +571,7 @@ def _merge_events(aws_event: Any, data_transformation_type: Type[RawBaseEvent]) Merge happens differently, depending on app type. """ if data_transformation_type == RawScheduledEvent: + # scheduled event if not isinstance(aws_event[0], dict): aws_event = list(itertools.chain(*aws_event)) is_depth = aws_event[0]["scheduler_type"] == SchedulerType.data_depth_milestone diff --git a/tests/unit/test_stream_app.py b/tests/unit/test_stream_app.py index 7b28bcd1..685ab50a 100644 --- a/tests/unit/test_stream_app.py +++ b/tests/unit/test_stream_app.py @@ -634,7 +634,7 @@ def stream_app(event, api, cache): event = [] timestamp = 1 # generate 3 events with 2 records each - for _ in range(1, 4): + for _ in range(3): event.extend( [ RawStreamTimeEvent(