from bs4 import BeautifulSoup


simple_mock = BeautifulSoup(
    """
    <html>
        <head>
            <link rel='shortcut icon' href='https://www.bbc.com/favicon.ico' />
        </head>
        <body>
            <article />
        </body>
    </html>
    """,
    "lxml",
)

mock_without_url = BeautifulSoup(
    """
    <html>
        <head>
            <link rel='shortcut icon' href='favicon.ico' />
        </head>
        <body>
            <article />
        </body>
    </html>
    """,
    "lxml",
)

mock_without_header = BeautifulSoup(
    """
    <html>
        <body>
            <article />
        </body>
    </html>
    """,
    "lxml",
)

mock_with_weird_path = BeautifulSoup(
    """
    <html>
        <head>
            <link rel='shortcut icon' href='//www.theguardian.com/jabadaba/doe/favicon.ico' />
        </head>
        <body>
            <article />
        </body>
    </html>
    """,
    "lxml",
)

mock_with_other_url = BeautifulSoup(
    """
    <html>
        <head>
            <link rel='stylesheet' href='https://www.theguardian.com/main.css' />
            <link rel='icon' href='https://www.theguardian.com/icon.png' />
        </head>
        <body>
            <article />
        </body>
    </html>
    """,
    "lxml",
)

mock_with_multiple_icons = BeautifulSoup(
    """
    <html>
        <head>
            <link rel='stylesheet' href='https://www.theguardian.com/main.css' />
            <link rel='icon' href='https://www.theguardian.com/icon.png' />
            <link rel='shortcut icon' href='https://www.theguardian.com/icon.png' />
            <link rel='apple-touch-icon' href='https://www.theguardian.com/icon.png' />
            <link rel='apple-touch-icon-precomposed' href='https://www.theguardian.com/icon.png' />
            <link rel='shortcut icon' href='https://www.bbc.com/favicon.ico' />
        </head>
        <body>
            <article />
        </body>
    </html>
    """,
    "lxml",
)
