Add SWF endpoint: StartWorkflowExecution
This commit is contained in:
parent
fbcdd5f2bd
commit
92cf64c2ad
5 changed files with 177 additions and 6 deletions
|
|
@ -3,6 +3,7 @@ from sure import expect
|
|||
from moto.swf.models import (
|
||||
Domain,
|
||||
GenericType,
|
||||
WorkflowExecution,
|
||||
)
|
||||
|
||||
|
||||
|
|
@ -65,3 +66,19 @@ def test_type_full_dict_representation():
|
|||
def test_type_string_representation():
|
||||
_type = FooType("test-foo", "v1.0")
|
||||
str(_type).should.equal("FooType(name: test-foo, version: v1.0, status: REGISTERED)")
|
||||
|
||||
|
||||
# WorkflowExecution
|
||||
def test_workflow_execution_creation():
|
||||
wfe = WorkflowExecution("workflow_type_whatever", child_policy="TERMINATE")
|
||||
wfe.workflow_type.should.equal("workflow_type_whatever")
|
||||
wfe.child_policy.should.equal("TERMINATE")
|
||||
|
||||
def test_workflow_execution_string_representation():
|
||||
wfe = WorkflowExecution("workflow_type_whatever", child_policy="TERMINATE")
|
||||
str(wfe).should.match(r"^WorkflowExecution\(run_id: .*\)")
|
||||
|
||||
def test_workflow_execution_generates_a_random_run_id():
|
||||
wfe1 = WorkflowExecution("workflow_type_whatever")
|
||||
wfe2 = WorkflowExecution("workflow_type_whatever")
|
||||
wfe1.run_id.should_not.equal(wfe2.run_id)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue