Skip to content

Commit 7359227

Browse files
committed
Added a test
1 parent 8ec0b48 commit 7359227

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

Diff for: tests/unit/test_steps.py

+17
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,23 @@ def test_task_state_creation():
214214
'End': True
215215
}
216216

217+
def test_task_state_create_fail_for_duplicated_dynamic_timeout_fields():
218+
with pytest.raises(ValueError):
219+
Task(
220+
'Task',
221+
resource='arn:aws:lambda:us-east-1:1234567890:function:StartLambda',
222+
timeout_seconds=1,
223+
timeout_seconds_path='$.timeout',
224+
)
225+
226+
with pytest.raises(ValueError):
227+
Task(
228+
'Task',
229+
resource='arn:aws:lambda:us-east-1:1234567890:function:StartLambda',
230+
heartbeat_seconds=1,
231+
heartbeat_seconds_path='$.heartbeat',
232+
)
233+
217234
def test_parallel_state_creation():
218235
parallel_state = Parallel('Parallel')
219236
parallel_state.add_branch(Pass('Branch 1'))

0 commit comments

Comments
 (0)