Skip to content

Commit

Permalink
Remove http duplicates in resolver test
Browse files Browse the repository at this point in the history
  • Loading branch information
lazebnyi committed Dec 12, 2024
1 parent ba7b95e commit b867154
Showing 1 changed file with 0 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -279,29 +279,3 @@ def test_dynamic_streams_read_with_http_components_resolver():
assert [stream.name for stream in actual_catalog.streams] == expected_stream_names
assert len(records) == 2
assert [record.stream for record in records] == expected_stream_names


def test_duplicated_dynamic_streams_read_with_http_components_resolver():
with HttpMocker() as http_mocker:
http_mocker.get(
HttpRequest(url="https://api.test.com/duplicates_items"),
HttpResponse(
body=json.dumps(
[
{"id": 1, "name": "item_1"},
{"id": 2, "name": "item_2"},
{"id": 3, "name": "item_2"},
]
)
),
)

with pytest.raises(AirbyteTracedException) as exc_info:
source = ConcurrentDeclarativeSource(
source_config=_MANIFEST_WITH_DUPLICATES, config=_CONFIG, catalog=None, state=None
)
source.discover(logger=source.logger, config=_CONFIG)
assert (
str(exc_info.value)
== "Dynamic streams list contains a duplicate name: item_2. Please contact Airbyte Support."
)

0 comments on commit b867154

Please sign in to comment.