From 70e6b22e7f463666418695291862097f47c12907 Mon Sep 17 00:00:00 2001 From: HH Date: Fri, 1 Sep 2023 12:33:50 +0800 Subject: [PATCH] add mock get_private_key for unit-test Signed-off-by: HH --- tests/flytekit/unit/types/structured_dataset/test_snowflake.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/flytekit/unit/types/structured_dataset/test_snowflake.py b/tests/flytekit/unit/types/structured_dataset/test_snowflake.py index 0c88be40d56..c957c0bbcee 100644 --- a/tests/flytekit/unit/types/structured_dataset/test_snowflake.py +++ b/tests/flytekit/unit/types/structured_dataset/test_snowflake.py @@ -33,9 +33,10 @@ def wf() -> pd.DataFrame: return t2(sd=sd) +@mock.patch("flytekit.types.structured.snowflake.get_private_key", return_value="pb") @mock.patch("snowflake.connector.connect") @pytest.mark.asyncio -async def test_sf_wf(mock_connect): +async def test_sf_wf(mock_connect, mock_get_private_key): class mock_dataframe: def to_dataframe(self): return pd.DataFrame({"Name": ["Tom", "Joseph"], "Age": [20, 22]})