Skip to content

Commit

Permalink
fix unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
eisber committed Jun 6, 2024
1 parent d430506 commit 41941ed
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/test_shortcuts.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@

@patch("sempy.fabric.list_items")
@patch("sempy.fabric.resolve_workspace_id")
@patch("sempy.fabric.resolve_item_id")
@patch("sempy.fabric.FabricRestClient")
def test_create_shortcut_onelake(fabric_rest_client_mock, resolve_workspace_id_mock, list_items_mock):
def test_create_shortcut_onelake(fabric_rest_client_mock, resolve_item_id_mock, resolve_workspace_id_mock, list_items_mock):
# prepare mocks
def resolve_workspace_id_mock_side_effect(workspace_name):
if workspace_name == "source_workspace":
Expand All @@ -20,6 +21,8 @@ def resolve_workspace_id_mock_side_effect(workspace_name):

resolve_workspace_id_mock.side_effect = resolve_workspace_id_mock_side_effect

resolve_item_id_mock.return_value = "00000000-0000-0000-0000-00000000000A"

def list_items_side_effect(type, workspace):
assert type == "Lakehouse"

Expand Down

0 comments on commit 41941ed

Please sign in to comment.