@@ -771,25 +771,12 @@ def test_state_output_from_dict_empty_operations():
771771 assert output .next_marker == "marker123"
772772
773773
774- @patch ("aws_durable_execution_sdk_python.lambda_service.boto3" )
775- def test_lambda_client_initialize_from_endpoint_and_region (mock_boto3 ):
776- """Test LambdaClient.initialize_from_endpoint_and_region method."""
777- mock_client = Mock ()
778- mock_boto3 .client .return_value = mock_client
779-
780- lambda_client = LambdaClient .initialize_from_endpoint_and_region (
781- "https://test.com" , "us-east-1"
782- )
783-
784- mock_boto3 .client .assert_called_once_with (
785- "lambdainternal" , endpoint_url = "https://test.com" , region_name = "us-east-1"
786- )
787- assert lambda_client .client == mock_client
788-
789-
790774@patch .dict (
791775 "os.environ" ,
792- {"LOCAL_RUNNER_ENDPOINT" : "http://test:5000" , "LOCAL_RUNNER_REGION" : "us-west-1" },
776+ {
777+ "DURABLE_LOCAL_RUNNER_ENDPOINT" : "http://test:5000" ,
778+ "DURABLE_LOCAL_RUNNER_REGION" : "us-west-1" ,
779+ },
793780)
794781@patch ("aws_durable_execution_sdk_python.lambda_service.boto3" )
795782def test_lambda_client_initialize_local_runner_client (mock_boto3 ):
@@ -805,20 +792,6 @@ def test_lambda_client_initialize_local_runner_client(mock_boto3):
805792 assert lambda_client .client == mock_client
806793
807794
808- @patch .dict (
809- "os.environ" , {"DEX_ENDPOINT" : "https://lambda.test.com" , "DEX_REGION" : "eu-west-1" }
810- )
811- @patch (
812- "aws_durable_execution_sdk_python.lambda_service.LambdaClient.initialize_from_endpoint_and_region"
813- )
814- def test_lambda_client_initialize_from_env (mock_init ):
815- """Test LambdaClient.initialize_from_env method."""
816- LambdaClient .initialize_from_env ()
817- mock_init .assert_called_once_with (
818- endpoint = "https://lambda.test.com" , region = "eu-west-1"
819- )
820-
821-
822795def test_lambda_client_checkpoint ():
823796 """Test LambdaClient.checkpoint method."""
824797 mock_client = Mock ()
@@ -1005,14 +978,6 @@ def test_lambda_client_stop():
1005978 assert result == "2023-01-01T00:00:00Z"
1006979
1007980
1008- @pytest .mark .skip (reason = "little informal integration test for interactive running." )
1009- def test_lambda_client_with_env_defaults ():
1010- client = LambdaClient .initialize_from_endpoint_and_region (
1011- "http://127.0.0.1:5000" , "us-east-1"
1012- )
1013- client .get_execution_state ("9692ca80-399d-4f52-8d0a-41acc9cd0492" , next_marker = "" )
1014-
1015-
1016981def test_durable_service_client_protocol_checkpoint ():
1017982 """Test DurableServiceClient protocol checkpoint method signature."""
1018983 mock_client = Mock (spec = DurableServiceClient )
@@ -1526,11 +1491,9 @@ def test_lambda_client_initialize_local_runner_client_defaults(mock_boto3):
15261491
15271492@patch .dict ("os.environ" , {}, clear = True )
15281493@patch (
1529- "aws_durable_execution_sdk_python.lambda_service.LambdaClient.initialize_from_endpoint_and_region "
1494+ "aws_durable_execution_sdk_python.lambda_service.LambdaClient.initialize_from_env "
15301495)
15311496def test_lambda_client_initialize_from_env_defaults (mock_init ):
15321497 """Test LambdaClient.initialize_from_env with default environment values."""
15331498 LambdaClient .initialize_from_env ()
1534- mock_init .assert_called_once_with (
1535- endpoint = "http://host.docker.internal:5000" , region = "us-east-1"
1536- )
1499+ mock_init .assert_called_once_with ()
0 commit comments