@@ -838,10 +838,12 @@ def test_lambda_client_checkpoint():
838838 action = OperationAction .START ,
839839 )
840840
841- result = lambda_client .checkpoint ("token123" , [update ], None )
841+ result = lambda_client .checkpoint ("arn123" , " token123" , [update ], None )
842842
843843 mock_client .checkpoint_durable_execution .assert_called_once_with (
844- CheckpointToken = "token123" , Updates = [update .to_dict ()]
844+ DurableExecutionArn = "arn123" ,
845+ CheckpointToken = "token123" ,
846+ Updates = [update .to_dict ()],
845847 )
846848 assert isinstance (result , CheckpointOutput )
847849 assert result .checkpoint_token == "new_token" # noqa: S105
@@ -862,9 +864,12 @@ def test_lambda_client_checkpoint_with_client_token():
862864 action = OperationAction .START ,
863865 )
864866
865- result = lambda_client .checkpoint ("token123" , [update ], "client-token-123" )
867+ result = lambda_client .checkpoint (
868+ "arn123" , "token123" , [update ], "client-token-123"
869+ )
866870
867871 mock_client .checkpoint_durable_execution .assert_called_once_with (
872+ DurableExecutionArn = "arn123" ,
868873 CheckpointToken = "token123" ,
869874 Updates = [update .to_dict ()],
870875 ClientToken = "client-token-123" ,
@@ -888,10 +893,12 @@ def test_lambda_client_checkpoint_with_explicit_none_client_token():
888893 action = OperationAction .START ,
889894 )
890895
891- result = lambda_client .checkpoint ("token123" , [update ], None )
896+ result = lambda_client .checkpoint ("arn123" , " token123" , [update ], None )
892897
893898 mock_client .checkpoint_durable_execution .assert_called_once_with (
894- CheckpointToken = "token123" , Updates = [update .to_dict ()]
899+ DurableExecutionArn = "arn123" ,
900+ CheckpointToken = "token123" ,
901+ Updates = [update .to_dict ()],
895902 )
896903 assert isinstance (result , CheckpointOutput )
897904 assert result .checkpoint_token == "new_token" # noqa: S105
@@ -912,10 +919,13 @@ def test_lambda_client_checkpoint_with_empty_string_client_token():
912919 action = OperationAction .START ,
913920 )
914921
915- result = lambda_client .checkpoint ("token123" , [update ], "" )
922+ result = lambda_client .checkpoint ("arn123" , " token123" , [update ], "" )
916923
917924 mock_client .checkpoint_durable_execution .assert_called_once_with (
918- CheckpointToken = "token123" , Updates = [update .to_dict ()], ClientToken = ""
925+ DurableExecutionArn = "arn123" ,
926+ CheckpointToken = "token123" ,
927+ Updates = [update .to_dict ()],
928+ ClientToken = "" ,
919929 )
920930 assert isinstance (result , CheckpointOutput )
921931 assert result .checkpoint_token == "new_token" # noqa: S105
@@ -936,9 +946,10 @@ def test_lambda_client_checkpoint_with_string_value_client_token():
936946 action = OperationAction .START ,
937947 )
938948
939- result = lambda_client .checkpoint ("token123" , [update ], "my-client-token" )
949+ result = lambda_client .checkpoint ("arn123" , " token123" , [update ], "my-client-token" )
940950
941951 mock_client .checkpoint_durable_execution .assert_called_once_with (
952+ DurableExecutionArn = "arn123" ,
942953 CheckpointToken = "token123" ,
943954 Updates = [update .to_dict ()],
944955 ClientToken = "my-client-token" ,
@@ -960,7 +971,7 @@ def test_lambda_client_checkpoint_with_exception():
960971 )
961972
962973 with pytest .raises (CheckpointError ):
963- lambda_client .checkpoint ("token123" , [update ], None )
974+ lambda_client .checkpoint ("arn123" , " token123" , [update ], None )
964975
965976
966977def test_lambda_client_get_execution_state ():
@@ -971,10 +982,13 @@ def test_lambda_client_get_execution_state():
971982 }
972983
973984 lambda_client = LambdaClient (mock_client )
974- result = lambda_client .get_execution_state ("token123" , "marker" , 500 )
985+ result = lambda_client .get_execution_state ("arn123" , " token123" , "marker" , 500 )
975986
976987 mock_client .get_durable_execution_state .assert_called_once_with (
977- CheckpointToken = "token123" , Marker = "marker" , MaxItems = 500
988+ DurableExecutionArn = "arn123" ,
989+ CheckpointToken = "token123" ,
990+ Marker = "marker" ,
991+ MaxItems = 500 ,
978992 )
979993 assert len (result .operations ) == 1
980994
@@ -1018,9 +1032,11 @@ def test_durable_service_client_protocol_checkpoint():
10181032 )
10191033 ]
10201034
1021- result = mock_client .checkpoint ("token" , updates , "client_token" )
1035+ result = mock_client .checkpoint ("arn123" , " token" , updates , "client_token" )
10221036
1023- mock_client .checkpoint .assert_called_once_with ("token" , updates , "client_token" )
1037+ mock_client .checkpoint .assert_called_once_with (
1038+ "arn123" , "token" , updates , "client_token"
1039+ )
10241040 assert result == mock_output
10251041
10261042
@@ -1030,9 +1046,11 @@ def test_durable_service_client_protocol_get_execution_state():
10301046 mock_output = StateOutput (operations = [], next_marker = "marker" )
10311047 mock_client .get_execution_state .return_value = mock_output
10321048
1033- result = mock_client .get_execution_state ("token" , "marker" , 1000 )
1049+ result = mock_client .get_execution_state ("arn123" , " token" , "marker" , 1000 )
10341050
1035- mock_client .get_execution_state .assert_called_once_with ("token" , "marker" , 1000 )
1051+ mock_client .get_execution_state .assert_called_once_with (
1052+ "arn123" , "token" , "marker" , 1000
1053+ )
10361054 assert result == mock_output
10371055
10381056
0 commit comments