from time import struct_time

from bs4 import BeautifulSoup


feed_mock = {
    "bozo": 0,
    "encoding": "utf-8",
    "entries": [
        {
            "guidislink": False,
            "href": "",
            "id": "https://www.bbc.co.uk/news/world-us-canada-48338168",
            "link": "https://www.bbc.co.uk/news/world-us-canada-48338168",
            "links": [
                {
                    "href": "https://www.bbc.co.uk/news/world-us-canada-48338168",
                    "rel": "alternate",
                    "type": "text/html",
                }
            ],
            "media_thumbnail": [
                {
                    "height": "1152",
                    "url": "http://c.files.bbci.co.uk/7605/production/_107031203_mediaitem107031202.jpg",
                    "width": "2048",
                }
            ],
            "published": "Mon, 20 May 2019 16:07:37 GMT",
            "published_parsed": struct_time((2019, 5, 20, 16, 7, 37, 0, 140, 0)),
            "summary": "Foreign Minister Mohammad Javad Zarif says the US "
            "president should try showing Iranians some respect.",
            "summary_detail": {
                "base": "http://feeds.bbci.co.uk/news/rss.xml",
                "language": None,
                "type": "text/html",
                "value": "Foreign Minister Mohammad Javad "
                "Zarif says the US president should "
                "try showing Iranians some "
                "respect.",
            },
            "title": "Trump's genocidal taunts will not end Iran - Zarif",
            "title_detail": {
                "base": "http://feeds.bbci.co.uk/news/rss.xml",
                "language": None,
                "type": "text/plain",
                "value": "Trump's genocidal taunts will not end Iran - Zarif",
            },
        },
        {
            "guidislink": False,
            "href": "",
            "id": "https://www.bbc.co.uk/news/technology-48334739",
            "link": "https://www.bbc.co.uk/news/technology-48334739",
            "links": [
                {
                    "href": "https://www.bbc.co.uk/news/technology-48334739",
                    "rel": "alternate",
                    "type": "text/html",
                }
            ],
            "media_thumbnail": [
                {
                    "height": "432",
                    "url": "http://c.files.bbci.co.uk/4789/production/_107031381_mediaitem107028670.jpg",
                    "width": "768",
                }
            ],
            "published": "Mon, 20 May 2019 12:19:19 GMT",
            "published_parsed": struct_time((2019, 5, 20, 12, 19, 19, 0, 140, 0)),
            "summary": "Google's move to end business ties with Huawei will "
            "affect current devices and future purchases.",
            "summary_detail": {
                "base": "http://feeds.bbci.co.uk/news/rss.xml",
                "language": None,
                "type": "text/html",
                "value": "Google's move to end business ties "
                "with Huawei will affect current "
                "devices and future purchases.",
            },
            "title": "Huawei's Android loss: How it affects you",
            "title_detail": {
                "base": "http://feeds.bbci.co.uk/news/rss.xml",
                "language": None,
                "type": "text/plain",
                "value": "Huawei's Android loss: How it affects you",
            },
        },
        {
            "guidislink": False,
            "href": "",
            "id": "https://www.bbc.co.uk/news/uk-england-birmingham-48339080",
            "link": "https://www.bbc.co.uk/news/uk-england-birmingham-48339080",
            "links": [
                {
                    "href": "https://www.bbc.co.uk/news/uk-england-birmingham-48339080",
                    "rel": "alternate",
                    "type": "text/html",
                }
            ],
            "media_thumbnail": [
                {
                    "height": "549",
                    "url": "http://c.files.bbci.co.uk/11D67/production/_107036037_lgbtheadjpg.jpg",
                    "width": "976",
                }
            ],
            "published": "Mon, 20 May 2019 16:32:38 GMT",
            "published_parsed": struct_time((2019, 5, 20, 16, 32, 38, 0, 140, 0)),
            "summary": "Police are investigating the messages while an MP "
            "calls for a protest exclusion zone to protect "
            "children.",
            "summary_detail": {
                "base": "http://feeds.bbci.co.uk/news/rss.xml",
                "language": None,
                "type": "text/html",
                "value": "Police are investigating the "
                "messages while an MP calls for a "
                "protest exclusion zone to protect "
                "children.",
            },
            "title": "Birmingham head teacher threatened over LGBT lessons",
            "title_detail": {
                "base": "http://feeds.bbci.co.uk/news/rss.xml",
                "language": None,
                "type": "text/plain",
                "value": "Birmingham head teacher threatened over LGBT lessons",
            },
        },
    ],
    "feed": {
        "image": {
            "href": "https://news.bbcimg.co.uk/nol/shared/img/bbc_news_120x60.gif",
            "link": "https://www.bbc.co.uk/news/",
            "title": "BBC News - Home",
            "language": "en-gb",
        },
        "link": "https://www.bbc.co.uk/news/",
        "links": [
            {
                "href": "https://www.bbc.co.uk/news/",
                "rel": "alternate",
                "type": "text/html",
            }
        ],
        "title": "BBC News - Home",
    },
    "href": "http://feeds.bbci.co.uk/news/rss.xml",
    "status": 200,
    "version": "rss20",
}

website_mock = BeautifulSoup(
    """
    <html>
        <head>
            <link rel="shortcut icon" href="https://www.bbc.co.uk/news/favicon.ico" />
        </head>
        <body>
            <article />
        </body>
    </html>
    """,
    "lxml",
)
