Skip to content

Commit 555b88e

Browse files
author
Qian Chen
committed
test1
1 parent e8e0d3d commit 555b88e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/unit/test_handler_service.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,14 @@ def __init__(self):
5151

5252

5353
@patch('sagemaker_inference.environment.Environment')
54+
@patch('importlib.util.spec_from_file_location', MagicMock())
5455
@patch('importlib.util.module_from_spec', return_value=UserModuleTransformFn())
5556
@patch('os.path.exists', return_value=True)
56-
def test_user_module_transform_fn(import_module, env, path_exists):
57+
def test_user_module_transform_fn(spec_from_file_location, module_from_spec, env, path_exists):
5758
env.return_value.module_name = MODULE_NAME
5859
transformer = HandlerService._user_module_transformer()
5960

60-
import_module.assert_called_once_with(MODULE_NAME)
61+
# module_from_spec.assert_called_once_with(MODULE_NAME)
6162
assert isinstance(transformer._default_inference_handler, DefaultInferenceHandler)
6263
assert isinstance(transformer, Transformer)
6364

0 commit comments

Comments
 (0)