Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix: Update unit tests for multi-entity parameter changes
Updated test_mapper.py to use new parameter names:
- entity_column -> entity_columns (accepts both str and List[str])
- result["entity"] -> result["entities"] (now returns list)

Tests now correctly check for list of entities returned by
create_all_from_model().

Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>
  • Loading branch information
YassinNouh21 committed Jan 24, 2026
commit 5df775a7df5bb181efb0f27cd2c1422e4b4b007d
13 changes: 7 additions & 6 deletions sdk/python/tests/unit/dbt/test_mapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ def test_create_feature_view(self, sample_model):
fv = mapper.create_feature_view(
model=sample_model,
source=source,
entity_column="driver_id",
entity_columns="driver_id",
)

assert fv.name == "driver_stats"
Expand All @@ -262,7 +262,7 @@ def test_create_feature_view_with_exclude(self, sample_model):
fv = mapper.create_feature_view(
model=sample_model,
source=source,
entity_column="driver_id",
entity_columns="driver_id",
exclude_columns=["is_active"],
)

Expand All @@ -276,14 +276,15 @@ def test_create_all_from_model(self, sample_model):
mapper = DbtToFeastMapper(data_source_type="bigquery")
result = mapper.create_all_from_model(
model=sample_model,
entity_column="driver_id",
entity_columns="driver_id",
)

assert "entity" in result
assert "entities" in result
assert "data_source" in result
assert "feature_view" in result

assert result["entity"].name == "driver_id"
assert len(result["entities"]) == 1
assert result["entities"][0].name == "driver_id"
assert result["data_source"].name == "driver_stats_source"
assert result["feature_view"].name == "driver_stats"

Expand All @@ -294,7 +295,7 @@ def test_feature_type_mapping(self, sample_model):
fv = mapper.create_feature_view(
model=sample_model,
source=source,
entity_column="driver_id",
entity_columns="driver_id",
)

# Find specific features and check types
Expand Down
Loading