@@ -3542,9 +3542,13 @@ def test_create_default_stream_with_datetime_cursor_then_runs_state_migrations()
35423542 )
35433543 ]
35443544 )
3545- factory = ModelToComponentFactory (emit_connector_builder_messages = True , connector_state_manager = connector_state_manager )
3545+ factory = ModelToComponentFactory (
3546+ emit_connector_builder_messages = True , connector_state_manager = connector_state_manager
3547+ )
35463548 stream = factory .create_component (
3547- model_type = DeclarativeStreamModel , component_definition = YamlDeclarativeSource ._parse (content ), config = input_config
3549+ model_type = DeclarativeStreamModel ,
3550+ component_definition = YamlDeclarativeSource ._parse (content ),
3551+ config = input_config ,
35483552 )
35493553 assert stream .cursor .state ["states" ] == [
35503554 {"cursor" : {"updated_at" : stream_state ["updated_at" ]}, "partition" : {"type" : "type_1" }},
@@ -3627,9 +3631,7 @@ def test_create_concurrent_cursor_from_perpartition_cursor_runs_state_migrations
36273631
36283632 stream_state = {
36293633 "state" : {"updated_at" : "2025-01-01T00:00:00.000000+00:00" },
3630- "parent_state" : {
3631- "parent_stream" : {"updated_at" : "2025-01-01T00:00:00.000000+00:00" }
3632- }
3634+ "parent_state" : {"parent_stream" : {"updated_at" : "2025-01-01T00:00:00.000000+00:00" }},
36333635 }
36343636 connector_state_manager = ConnectorStateManager (
36353637 state = [
@@ -3642,14 +3644,19 @@ def test_create_concurrent_cursor_from_perpartition_cursor_runs_state_migrations
36423644 )
36433645 ]
36443646 )
3645- factory = ModelToComponentFactory (emit_connector_builder_messages = True ,
3646- connector_state_manager = connector_state_manager )
3647+ factory = ModelToComponentFactory (
3648+ emit_connector_builder_messages = True , connector_state_manager = connector_state_manager
3649+ )
36473650 stream = factory .create_component (
3648- model_type = DeclarativeStreamModel , component_definition = YamlDeclarativeSource ._parse (content ),
3649- config = input_config
3651+ model_type = DeclarativeStreamModel ,
3652+ component_definition = YamlDeclarativeSource ._parse (content ),
3653+ config = input_config ,
36503654 )
36513655 assert stream .cursor .state ["lookback_window" ] == 20
3652- assert stream .cursor ._partition_router .parent_stream_configs [0 ].stream .cursor .state ["updated_at" ] == "2024-02-01T00:00:00.000000+0000"
3656+ assert (
3657+ stream .cursor ._partition_router .parent_stream_configs [0 ].stream .cursor .state ["updated_at" ]
3658+ == "2024-02-01T00:00:00.000000+0000"
3659+ )
36533660
36543661
36553662def test_create_concurrent_cursor_uses_min_max_datetime_format_if_defined ():
0 commit comments