Skip to content

Commit e4219de

Browse files
author
Steven Anton
committed
Fix unit tests
1 parent e3dc648 commit e4219de

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

test/unit/test_model_server.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@
2121

2222
from sagemaker_inference import environment
2323
from sagemaker_pytorch_serving_container import torchserve
24-
from sagemaker_pytorch_serving_container.torchserve import TS_NAMESPACE, REQUIREMENTS_PATH
24+
from sagemaker_pytorch_serving_container.torchserve import (
25+
TS_NAMESPACE, REQUIREMENTS_PATH, LOG4J_OVERRIDE_PATH
26+
)
2527

2628
PYTHON_PATH = "python_path"
2729
DEFAULT_CONFIGURATION = "default_configuration"
@@ -49,7 +51,8 @@ def test_start_torchserve_default_service_handler(
4951

5052
adapt.assert_called_once_with(torchserve.DEFAULT_HANDLER_SERVICE)
5153
create_config.assert_called_once_with()
52-
exists.assert_called_once_with(REQUIREMENTS_PATH)
54+
exists.assert_any_call(REQUIREMENTS_PATH)
55+
exists.assert_any_call(LOG4J_OVERRIDE_PATH)
5356
install_requirements.assert_called_once_with()
5457

5558
ts_model_server_cmd = [
@@ -91,7 +94,8 @@ def test_start_torchserve_default_service_handler_multi_model(
9194
torchserve.start_torchserve()
9295
torchserve.ENABLE_MULTI_MODEL = False
9396
create_config.assert_called_once_with()
94-
exists.assert_called_once_with(REQUIREMENTS_PATH)
97+
exists.assert_any_call(REQUIREMENTS_PATH)
98+
exists.assert_any_call(LOG4J_OVERRIDE_PATH)
9599
install_requirements.assert_called_once_with()
96100

97101
ts_model_server_cmd = [

0 commit comments

Comments
 (0)