from unittest.mock import Mock
import webbrowser


def mock_web_browser(monkeypatch):
    """Mock the python standard webbrowser"""
    mock_web_browser = Mock(spec=webbrowser)
    monkeypatch.setattr(
        "yeahyeah_plugins.url_pattern_plugin.core.webbrowser", mock_web_browser
    )
    return mock_web_browser