Skip to content

Commit

Permalink
fix source-accept test
Browse files Browse the repository at this point in the history
  • Loading branch information
marcosmarxm committed Oct 21, 2022
1 parent 6812ddb commit 42c8d49
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,9 @@ def _validate_records_structure(records: List[AirbyteRecordMessage], configured_
record_fields = set(get_object_structure(record.data))
common_fields = set.intersection(record_fields, schema_pathes)

assert common_fields, f" Record {record} from {record.stream} stream with fields {record_fields} should have some fields mentioned by json schema: {schema_pathes}"
assert (
common_fields
), f" Record {record} from {record.stream} stream with fields {record_fields} should have some fields mentioned by json schema: {schema_pathes}"

@staticmethod
def _validate_schema(records: List[AirbyteRecordMessage], configured_catalog: ConfiguredAirbyteCatalog):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ def test_read(schema, record, should_fail):
]
t = _TestBasicRead()
if should_fail:
with pytest.raises(AssertionError, match="stream should have some fields mentioned by json schema"):
with pytest.raises(AssertionError, match="should have some fields mentioned by json schema"):
t.test_read(None, catalog, input_config, [], docker_runner_mock, MagicMock())
else:
t.test_read(None, catalog, input_config, [], docker_runner_mock, MagicMock())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from setuptools import find_packages, setup

MAIN_REQUIREMENTS = [
"airbyte-cdk~=0.1",
"airbyte-cdk~=0.2",
]

TEST_REQUIREMENTS = [
Expand Down

0 comments on commit 42c8d49

Please sign in to comment.