Skip to content

Commit 806d500

Browse files
committed
modified the unit test cases
1 parent 033ce8d commit 806d500

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

tests/unitary/with_extras/feature_store/test_dataset.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
from ads.feature_store.service.oci_dataset import OCIDataset
2222
from ads.feature_store.service.oci_feature_store import OCIFeatureStore
2323
from ads.feature_store.feature_store import FeatureStore
24-
from tests.unitary.install_required.feature_store.test_feature_store import (
24+
from tests.unitary.with_extras.feature_store.test_feature_store import (
2525
FEATURE_STORE_PAYLOAD,
2626
)
2727

tests/unitary/with_extras/feature_store/test_feature_group.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
from ads.feature_store.input_feature_detail import FeatureDetail, FeatureType
2222
from ads.feature_store.service.oci_feature_group import OCIFeatureGroup
2323
from ads.feature_store.service.oci_feature_store import OCIFeatureStore
24-
from tests.unitary.install_required.feature_store.test_feature_group_job import (
24+
from tests.unitary.with_extras.feature_store.test_feature_group_job import (
2525
FEATURE_GROUP_JOB_PAYLOAD,
2626
)
2727

@@ -32,6 +32,8 @@
3232
"entityId": "ocid1.entity.oc1.iad.xxx",
3333
"description": "feature group description",
3434
"primaryKeys": {"items": []},
35+
"partitionKeys": {"items": []},
36+
"transformationParameters": "e30=",
3537
"featureStoreId": "ocid1.featurestore.oc1.iad.xxx",
3638
"compartmentId": "ocid1.compartment.oc1.iad.xxx",
3739
"inputFeatureDetails": [
@@ -133,6 +135,8 @@ def test_with_methods_1(self, mock_load_default_properties):
133135
.with_entity_id(self.payload["entityId"])
134136
.with_feature_store_id(self.payload["featureStoreId"])
135137
.with_primary_keys([])
138+
.with_partition_keys([])
139+
.with_transformation_kwargs({})
136140
.with_input_feature_details(input_feature_details)
137141
)
138142
assert self.prepare_dict(
@@ -154,6 +158,8 @@ def test_with_methods_2(self):
154158
.with_entity_id(self.payload["entityId"])
155159
.with_feature_store_id(self.payload["featureStoreId"])
156160
.with_primary_keys([])
161+
.with_partition_keys([])
162+
.with_transformation_kwargs({})
157163
.with_input_feature_details(input_feature_details)
158164
)
159165
assert self.prepare_dict(
@@ -205,8 +211,8 @@ def test_from_id(self, mock_oci_from_id, mock__update_from_oci_fs_model):
205211

206212
@patch.object(OCIFeatureGroup, "create")
207213
def test_create_success(
208-
self,
209-
mock_oci_dsc_model_create,
214+
self,
215+
mock_oci_dsc_model_create,
210216
):
211217
"""Tests creating datascience feature_group."""
212218
oci_dsc_model = OCIFeatureGroup(**FEATURE_GROUP_PAYLOAD)
@@ -275,7 +281,7 @@ def test__to_oci_fs_entity(self, mock_load_key_file, mock_config_from_file):
275281
@patch.object(SparkSessionSingleton, "__init__", return_value=None)
276282
@patch.object(SparkSessionSingleton, "get_spark_session")
277283
def test_materialise(
278-
self, spark_session, get_spark_session, mocke_update, dataframe_fixture_basic
284+
self, spark_session, get_spark_session, mocke_update, dataframe_fixture_basic
279285
):
280286
with patch.object(FeatureGroupJob, "create") as mock_feature_group_job:
281287
with patch.object(FeatureStore, "from_id"):
@@ -318,7 +324,7 @@ def test_history(self, feature_store, spark_session, get_spark_session):
318324
@patch.object(SparkSessionSingleton, "get_spark_session")
319325
@patch.object(OCIFeatureStore, "from_id")
320326
def test_restore(
321-
self, feature_store, spark_session, get_spark_session, mock_update
327+
self, feature_store, spark_session, get_spark_session, mock_update
322328
):
323329
with patch.object(SparkEngine, "sql") as mock_execution_strategy:
324330
mock_execution_strategy.return_value = None

0 commit comments

Comments
 (0)