示例#1
0
 def test_trigger_start(self, mock_assert_accept, mock_relationship):
     user = UserNode()
     task = MagicMock()
     task.steps = MagicMock()
     user.trigger(task)
     mock_assert_accept.assert_called_once()
     task.steps.get.assert_called_once_with(node_type=NODE_TYPE.START)
示例#2
0
 def test_trigger(self, mock_assert_accept, mock_relationship):
     user = UserNode()
     task = MagicMock()
     task.steps = MagicMock()
     user.trigger(task, 'any sid')
     mock_assert_accept.assert_called_once()
     task.steps.get.assert_called_once_with(
         sid='any sid')