def delete_cli(workspace_path, recursive): """ Deletes objects from the Databricks workspace. To delete a folder add the recursive flag. """ delete(workspace_path, recursive)
def test_delete(): with mock.patch('databricks_cli.workspace.api.get_workspace_client' ) as get_workspace_client: api.delete(TEST_WORKSPACE_PATH, is_recursive=True) delete_mock = get_workspace_client.return_value.delete assert delete_mock.call_count == 1 assert delete_mock.call_args[0][0] == TEST_WORKSPACE_PATH assert delete_mock.call_args[0][1] == True