Implement reverseOrder option for GetWorkflowExecutionHistory and PollForDecisionTask

This commit is contained in:
Jean-Baptiste Barth 2015-10-11 19:14:31 +02:00
commit aa4adbb76e
6 changed files with 40 additions and 15 deletions

View file

@ -44,3 +44,10 @@ def test_poll_for_decision_task_when_none():
# this is the DecisionTask representation you get from the real SWF
# after waiting 60s when there's no decision to be taken
resp.should.equal({"previousStartedEventId": 0, "startedEventId": 0})
@mock_swf
def test_poll_for_decision_task_with_reverse_order():
conn = setup_workflow()
resp = conn.poll_for_decision_task("test-domain", "queue", reverse_order=True)
types = [evt["eventType"] for evt in resp["events"]]
types.should.equal(["DecisionTaskStarted", "DecisionTaskScheduled", "WorkflowExecutionStarted"])