From 7359227f88cc471e59c6ab7f13ad8d1634381233 Mon Sep 17 00:00:00 2001 From: Allen Li Date: Thu, 14 Jan 2021 10:49:38 -0800 Subject: [PATCH] Added a test --- tests/unit/test_steps.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tests/unit/test_steps.py b/tests/unit/test_steps.py index 87b5f17..301d1b8 100644 --- a/tests/unit/test_steps.py +++ b/tests/unit/test_steps.py @@ -214,6 +214,23 @@ def test_task_state_creation(): 'End': True } +def test_task_state_create_fail_for_duplicated_dynamic_timeout_fields(): + with pytest.raises(ValueError): + Task( + 'Task', + resource='arn:aws:lambda:us-east-1:1234567890:function:StartLambda', + timeout_seconds=1, + timeout_seconds_path='$.timeout', + ) + + with pytest.raises(ValueError): + Task( + 'Task', + resource='arn:aws:lambda:us-east-1:1234567890:function:StartLambda', + heartbeat_seconds=1, + heartbeat_seconds_path='$.heartbeat', + ) + def test_parallel_state_creation(): parallel_state = Parallel('Parallel') parallel_state.add_branch(Pass('Branch 1'))