Skip to content

Commit

Permalink
updated tests to test actual behavior
Browse files Browse the repository at this point in the history
Signed-off-by: Francisco Javier Arceo <[email protected]>
  • Loading branch information
franciscojavierarceo committed Sep 25, 2024
1 parent 4c941a9 commit 272b0f2
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions sdk/python/tests/unit/test_on_demand_python_transformation.py
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ def setUp(self):
source=driver_stats_source,
)
assert driver_stats_fv.entities == [driver.name]
assert driver_stats_fv.entity_columns == [driver.name]
assert driver_stats_fv.entity_columns == []

@on_demand_feature_view(
entities=[driver],
Expand Down Expand Up @@ -604,9 +604,10 @@ def python_stored_writes_feature_view(
python_stored_writes_feature_view,
]
)
applied_fv = self.store.get_feature_view("driver_hourly_stats")
assert applied_fv.entities[0] == driver.name
assert applied_fv.entity_columns[0].name == driver.name
fv_applied = self.store.get_feature_view("driver_hourly_stats")
assert fv_applied.entities == [driver.name]
# Note here that after apply() is called, the entity_columns are populated with the join_key
assert fv_applied.entity_columns[0].name == driver.join_key

self.store.write_to_online_store(
feature_view_name="driver_hourly_stats", df=driver_df
Expand Down

0 comments on commit 272b0f2

Please sign in to comment.