diff --git a/tests/SpiffWorkflow/bpmn/CollaborationTest.py b/tests/SpiffWorkflow/bpmn/CollaborationTest.py index a14d9f99b..77e547261 100644 --- a/tests/SpiffWorkflow/bpmn/CollaborationTest.py +++ b/tests/SpiffWorkflow/bpmn/CollaborationTest.py @@ -50,7 +50,18 @@ class CollaborationTest(BpmnWorkflowTestCase): self.assertEqual(len(messages), 1) self.assertEqual(len(workflow.bpmn_messages), 0) receive = workflow.get_tasks_from_spec_name('EventReceiveLetter')[0] - workflow.catch_bpmn_message('Love Letter Response', messages[0].payload, messages[0].correlations) + + # Waiting Events should contain details about what we are no waiting on. + events = workflow.waiting_events() + self.assertEqual(1, len(events)) + self.assertEqual("Message", events[0]['event_type']) + self.assertEqual("Love Letter Response", events[0]['name']) + self.assertEqual(['lover'], events[0]['value'][0].correlation_keys) + self.assertEqual('from_name', events[0]['value'][0].retrieval_expression) + self.assertEqual('lover_name', events[0]['value'][0].name) + + workflow.catch_bpmn_message('Love Letter Response', messages[0].payload, + messages[0].correlations) workflow.do_engine_steps() # The external message created above should be caught self.assertEqual(receive.state, TaskState.COMPLETED) diff --git a/tests/SpiffWorkflow/camunda/StartMessageEventTest.py b/tests/SpiffWorkflow/camunda/StartMessageEventTest.py index 5dd81a069..dd6200f53 100644 --- a/tests/SpiffWorkflow/camunda/StartMessageEventTest.py +++ b/tests/SpiffWorkflow/camunda/StartMessageEventTest.py @@ -17,7 +17,7 @@ class StartMessageTest(BaseTestCase): def testParserCanReturnStartMessages(self): parser = self.get_parser('message_test.bpmn') self.assertEqual( - parser.process_parsers['ThrowCatch'].start_messages(), ['Message_1rkbi27']) + parser.process_parsers['ThrowCatch'].start_messages(), ['ApprovalRequest']) parser = self.get_parser('random_fact.bpmn') self.assertEqual( diff --git a/tests/SpiffWorkflow/spiff/CorrelationTest.py b/tests/SpiffWorkflow/spiff/CorrelationTest.py index 6589eb2b8..c44be2a45 100644 --- a/tests/SpiffWorkflow/spiff/CorrelationTest.py +++ b/tests/SpiffWorkflow/spiff/CorrelationTest.py @@ -49,7 +49,11 @@ class DualConversationTest(BaseTestCase): self.assertEqual(len(messages), 2) message_one = [ msg for msg in messages if msg.name== 'Message Send One' ][0] message_two = [ msg for msg in messages if msg.name== 'Message Send Two' ][0] - self.assertIn('message_correlation_key_one', message_one.correlations) - self.assertNotIn('message_correlation_key_one', message_two.correlations) - self.assertIn('message_correlation_key_two', message_two.correlations) - self.assertNotIn('message_correlation_key_two', message_one.correlations) + + # fixme: This seemed to test that we get a nested structure of correlation keys and correlation properties + # Perhaps there should be a way to get the keys and thier associated properties - but things should not default to a nested structure. + + # self.assertIn('message_correlation_key_one', message_one.correlations) + # self.assertNotIn('message_correlation_key_one', message_two.correlations) + # self.assertIn('message_correlation_key_two', message_two.correlations) + # self.assertNotIn('message_correlation_key_two', message_one.correlations)