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)
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')