def mock_error_owwidget(node, message):
    """
    Create a mock OWWidget instance for `node`.

    :type node: SchemeNode

    """
    from Orange.OrangeWidgets.OWWidget import _DummyOWWidget
    widget = _DummyOWWidget()
    widget.widgetInfo = node.description
    widget._settingsFromSchema = node.properties
    for link in node.description.inputs:
        handler = link.handler
        if handler.startswith('self.'):
            _, handler = handler.split('.', 1)
        setattr(widget, handler, lambda *args: None)
    widget.setBlocking(True)
    widget.setErrorMessage(message)
    return widget
