Skip to content

Commit

Permalink
Update & remove test relating to valid-replication-keys
Browse files Browse the repository at this point in the history
  • Loading branch information
BernardWez committed Nov 24, 2023
1 parent bd524ef commit 02b1497
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions tests/test_elx/test_catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@
"selected": True,
"selected-by-default": True,
"table-key-properties": ["id"],
"valid-replication-keys": ["updated_at"],
},
},
],
Expand Down Expand Up @@ -154,32 +153,6 @@ def test_catalog_replication_key(tap: Tap):
)


def test_catalog_valid_replication_keys(tap: Tap):
"""
If we have an incremental stream, the catalog should have a metadata breadcrumb for the incremental
stream containing the key: `valid-replication-keys`.
This key should be associated with a list containing the fields that could be used as replication keys.
For example, the metadata breadcrumb of the stream should look as follows if `updated_at` is its replication_key.
"metadata": {
"inclusion": "available",
"selected": True,
"selected-by-default": True,
"table-key-properties": ["id"],
"valid-replication-keys": ["updated_at"],
}
"""
catalog_dict = tap.catalog.dict(by_alias=True)

replication_keys = catalog_dict["streams"][1]["metadata"][-1]["metadata"].get(
"valid-replication-keys", None
)

# Checks that value of `valid-replication-keys` equals to the replication-key
assert replication_keys == [DEFAULT_CATALOG["streams"][1]["replication_key"]]


def test_catalog_set_stream_replication_key(tap: Tap):
"""If we define a replication key, the catalog should be updated."""
catalog = tap.catalog
Expand Down

0 comments on commit 02b1497

Please sign in to comment.