'Add a hook for ``action`` to this entry.
:param string action: One of: \'accept\', \'reject\', \'fail\', \'complete\'
:param func: Function to execute when event occurs
:param kwargs: Keyword arguments that should be passed to ``func``
:raises: ValueError when given an invalid ``action``'

def add_hook(self, action, func, **kwargs):

    try:
        self._hooks[action].append(functools.partial(func, **kwargs))
    except KeyError:
        raise ValueError((u'`%s`    is    not    a    valid    entry    action' % action))
