Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bryantgray committed Jan 21, 2025
1 parent c6eb3be commit e235ee0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tests/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ def expected_automatic_fields(self):
"""return a dictionary with key of table name and set of value of automatic(primary key and bookmark field) fields"""
auto_fields = {}
for k, v in self.expected_metadata().items():
auto_fields[k] = v.get(self.PRIMARY_KEYS, set()) | v.get(self.BOOKMARK, set())
auto_fields[k] = set(v.get(self.PRIMARY_KEYS, [])) | set(v.get(self.BOOKMARK, []))
return auto_fields

def expected_replication_method(self):
Expand Down
5 changes: 2 additions & 3 deletions tests/test_klaviyo_discovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,8 @@ def test_run(self):
schema_and_metadata = menagerie.get_annotated_schema(conn_id, catalog['stream_id'])
metadata = schema_and_metadata["metadata"]
stream_properties = [item for item in metadata if item.get("breadcrumb") == []]
actual_primary_keys = set()
actual_primary_keys.add(stream_properties[0].get(
"metadata", {self.PRIMARY_KEYS: None}).get(self.PRIMARY_KEYS))
actual_primary_keys = stream_properties[0].get(
"metadata", {self.PRIMARY_KEYS: None}).get(self.PRIMARY_KEYS)
actual_replication_method = stream_properties[0].get(
"metadata", {self.REPLICATION_METHOD: None}).get(self.REPLICATION_METHOD)
actual_automatic_fields = set(
Expand Down

0 comments on commit e235ee0

Please sign in to comment.