Skip to content

Commit

Permalink
Added a test
Browse files Browse the repository at this point in the history
  • Loading branch information
lialln committed Jan 14, 2021
1 parent 8ec0b48 commit 7359227
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/unit/test_steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'))
Expand Down

0 comments on commit 7359227

Please sign in to comment.