Skip to content

Commit

Permalink
add mock get_private_key for unit-test
Browse files Browse the repository at this point in the history
Signed-off-by: HH <[email protected]>
  • Loading branch information
hhcs9527 committed Sep 10, 2023
1 parent c16591a commit 70e6b22
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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]})
Expand Down

0 comments on commit 70e6b22

Please sign in to comment.