Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix test mock
Signed-off-by: Brynn Yin <[email protected]>
  • Loading branch information
brynn-code committed Feb 19, 2024
commit 01f84613770e49a5a3be4ccd1362edabc8eaeac3
7 changes: 4 additions & 3 deletions sdk/ml/azure-ai-ml/tests/dsl/unittests/test_dsl_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@

import pydash
import pytest
from test_configs.dsl_pipeline import data_binding_expression
from test_utilities.utils import assert_job_cancel, omit_with_wildcard, prepare_dsl_curated

from azure.ai.ml import (
AmlTokenConfiguration,
Input,
Expand Down Expand Up @@ -50,8 +53,6 @@
UserErrorException,
ValidationException,
)
from test_configs.dsl_pipeline import data_binding_expression
from test_utilities.utils import assert_job_cancel, omit_with_wildcard, prepare_dsl_curated

from .._util import _DSL_TIMEOUT_SECOND, get_predecessors

Expand Down Expand Up @@ -959,7 +960,7 @@ def mock_from_rest(*args, **kwargs):
side_effect=mock_arm_id,
):
with mock.patch(
"azure.ai.ml._restclient.v2022_10_01.operations.ComponentVersionsOperations.create_or_update",
"azure.ai.ml._restclient.v2024_01_01_preview.operations.ComponentVersionsOperations.create_or_update",
side_effect=mock_create,
):
with mock.patch.object(Component, "_from_rest_object", side_effect=mock_from_rest):
Expand Down