From 4e6debbfda33d49582c0355bce845b0cc1240bd0 Mon Sep 17 00:00:00 2001 From: Fabio Buso Date: Fri, 1 Nov 2024 10:53:38 +0100 Subject: [PATCH] Fix unit tests --- python/tests/test_feature_group.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python/tests/test_feature_group.py b/python/tests/test_feature_group.py index c95200dca5..c26a989c68 100644 --- a/python/tests/test_feature_group.py +++ b/python/tests/test_feature_group.py @@ -904,6 +904,7 @@ def test_prepare_spark_location(self, mocker, backend_fixtures): def test_prepare_spark_location_with_s3_connector(self, mocker, backend_fixtures): # Arrange engine = spark.Engine() + refetch_api = mocker.patch("hsfs.storage_connector.S3Connector.refetch") engine_instance = mocker.patch("hsfs.engine.get_instance", return_value=engine) json = backend_fixtures["feature_group"]["get_basic_info"]["response"] fg = feature_group.FeatureGroup.from_response_json(json) @@ -918,6 +919,7 @@ def test_prepare_spark_location_with_s3_connector(self, mocker, backend_fixtures # Assert assert fg.location == path engine_instance.assert_called_once() + refetch_api.assert_called_once() def test_prepare_spark_location_with_s3_connector_python( self, mocker, backend_fixtures @@ -925,6 +927,7 @@ def test_prepare_spark_location_with_s3_connector_python( # Arrange engine = python.Engine() engine_instance = mocker.patch("hsfs.engine.get_instance", return_value=engine) + mocker.patch("hsfs.storage_connector.S3Connector.refetch") json = backend_fixtures["feature_group"]["get_basic_info"]["response"] fg = feature_group.FeatureGroup.from_response_json(json) fg._location = f"{fg.name}_{fg.version}"