def METHOD_NAME(console_plugin):
    """Test that we don't show warnings in our error dialog."""
    widget = console_plugin.get_widget()
    shell = widget.shell
    # Write warning in the console
    warning = ("/home/foo/bar.py:1926: UserWarning: baz\n"
               "Line 1\n"
               "Line 2\n"
               "  warnings.warn('baz')")
    shell.append_text_to_shell(warning, error=True, prompt=False)
    # Make sure the error dialog was not generated.
    assert widget.error_dlg is None