def METHOD_NAME(console_plugin, qtbot):
    """Test that completions work as expected."""
    shell = console_plugin.get_widget().shell
    # Get completions
    qtbot.keyClicks(shell, 'impor')
    qtbot.keyClick(shell, Qt.Key_Tab)
    qtbot.keyClick(shell.completion_widget, Qt.Key_Enter)
    # Assert completion was introduced in the console
    assert u'import' in shell.toPlainText()