Skip to content

Commit

Permalink
add simple unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
bubriks committed Dec 19, 2024
1 parent 2fcd32d commit 8f031dc
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion python/tests/test_storage_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,19 @@ def test_default_path(self, mocker):
)
sc.read(data_format="csv")
# assert
assert "s3://test-bucket" in mock_engine_read.call_args[0][3]
assert "" == mock_engine_read.call_args[0][3]

Check failure on line 117 in python/tests/test_storage_connector.py

View workflow job for this annotation

GitHub Actions / Lint and Stylecheck

Ruff (W293)

python/tests/test_storage_connector.py:117:1: W293 Blank line contains whitespace
def test_get_path(self, mocker):
mocker.patch("hsfs.engine.get_instance", return_value=spark.Engine())
sc = storage_connector.S3Connector(
id=1, name="test_connector", featurestore_id=1, bucket="test-bucket", path="abc/def"
)

# act
result = sc._get_path("some/location")

# assert
assert "s3://test-bucket/abc/def/some/location" == result


class TestRedshiftConnector:
Expand Down

0 comments on commit 8f031dc

Please sign in to comment.