Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
maximearmstrong committed Nov 8, 2024
1 parent 5ef1813 commit cfcd238
Showing 1 changed file with 16 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,25 @@


def test_fivetran_workspace_data_to_fivetran_connector_table_props_data(
workspace_data_api_mocks_fn: Callable,
fetch_workspace_data_api_mocks: Callable,
) -> None:
api_key = uuid.uuid4().hex
api_secret = uuid.uuid4().hex

resource = FivetranWorkspace(api_key=api_key, api_secret=api_secret)

with workspace_data_api_mocks_fn(include_sync_endpoints=False):
actual_workspace_data = resource.fetch_fivetran_workspace_data()
table_props_data = actual_workspace_data.to_fivetran_connector_table_props_data()
assert len(table_props_data) == 4
assert (
table_props_data[0].table == "schema_name_in_destination_1.table_name_in_destination_1"
)
assert (
table_props_data[1].table == "schema_name_in_destination_1.table_name_in_destination_2"
)
assert (
table_props_data[2].table == "schema_name_in_destination_2.table_name_in_destination_1"
)
assert (
table_props_data[3].table == "schema_name_in_destination_2.table_name_in_destination_2"
)
actual_workspace_data = resource.fetch_fivetran_workspace_data()
table_props_data = actual_workspace_data.to_fivetran_connector_table_props_data()
assert len(table_props_data) == 4
assert (
table_props_data[0].table == "schema_name_in_destination_1.table_name_in_destination_1"
)
assert (
table_props_data[1].table == "schema_name_in_destination_1.table_name_in_destination_2"
)
assert (
table_props_data[2].table == "schema_name_in_destination_2.table_name_in_destination_1"
)
assert (
table_props_data[3].table == "schema_name_in_destination_2.table_name_in_destination_2"
)

0 comments on commit cfcd238

Please sign in to comment.