Skip to content

Commit 19d1b22

Browse files
committed
Fix unit test
1 parent 35a83cd commit 19d1b22

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

unit_tests/sources/declarative/retrievers/test_state_delegating_retriever.py

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,14 @@
1313
AirbyteStateType,
1414
AirbyteStreamState,
1515
ConfiguredAirbyteCatalog,
16+
ConfiguredAirbyteStream,
17+
DestinationSyncMode,
1618
StreamDescriptor,
1719
Type,
1820
)
1921
from airbyte_cdk.sources.declarative.concurrent_declarative_source import (
2022
ConcurrentDeclarativeSource,
2123
)
22-
from airbyte_cdk.sources.embedded.catalog import to_configured_catalog, to_configured_stream
2324
from airbyte_cdk.test.mock_http import HttpMocker, HttpRequest, HttpResponse
2425

2526
_CONFIG = {"start_date": "2024-07-01T00:00:00.000Z"}
@@ -108,6 +109,28 @@
108109
}
109110

110111

112+
def to_configured_stream(
113+
stream,
114+
sync_mode=None,
115+
destination_sync_mode=DestinationSyncMode.append,
116+
cursor_field=None,
117+
primary_key=None,
118+
) -> ConfiguredAirbyteStream:
119+
return ConfiguredAirbyteStream(
120+
stream=stream,
121+
sync_mode=sync_mode,
122+
destination_sync_mode=destination_sync_mode,
123+
cursor_field=cursor_field,
124+
primary_key=primary_key,
125+
)
126+
127+
128+
def to_configured_catalog(
129+
configured_streams,
130+
) -> ConfiguredAirbyteCatalog:
131+
return ConfiguredAirbyteCatalog(streams=configured_streams)
132+
133+
111134
def create_configured_catalog(
112135
source: ConcurrentDeclarativeSource, config: dict
113136
) -> ConfiguredAirbyteCatalog:

0 commit comments

Comments
 (0)