from time import struct_time

from .mock_html import html_summary


simple_mock = {
    "entries": [
        {
            "author": "A. Author",
            "id": "https://www.bbc.co.uk/news/world-us-canada-48338168",
            "link": "https://www.bbc.co.uk/news/world-us-canada-48338168",
            "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.",
            "title": "Trump's 'genocidal taunts' will not end Iran - Zarif",
        }
    ]
}

multiple_mock = {
    "entries": [
        {
            "author": "A. Author",
            "id": "https://www.bbc.co.uk/news/world-us-canada-48338168",
            "link": "https://www.bbc.co.uk/news/world-us-canada-48338168",
            "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.",
            "title": "Trump's 'genocidal taunts' will not end Iran - Zarif",
        },
        {
            "author": "A. Author",
            "id": "https://www.bbc.co.uk/news/technology-48334739",
            "link": "https://www.bbc.co.uk/news/technology-48334739",
            "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.",
            "title": "Huawei's Android loss: How it affects you",
        },
        {
            "author": "A. Author",
            "id": "https://www.bbc.co.uk/news/uk-england-birmingham-48339080",
            "link": "https://www.bbc.co.uk/news/uk-england-birmingham-48339080",
            "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".',
            "title": "Birmingham head teacher threatened over LGBT lessons",
        },
    ]
}

mock_without_identifier = {
    "entries": [
        {
            "author": "A. Author",
            "link": "https://www.bbc.co.uk/news/world-us-canada-48338168",
            "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.",
            "title": "Trump's 'genocidal taunts' will not end Iran - Zarif",
        },
        {
            "author": "A. Author",
            "id": None,
            "link": "https://www.bbc.co.uk/news/technology-48334739",
            "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.",
            "title": "Huawei's Android loss: How it affects you",
        },
    ]
}

mock_without_publish_date = {
    "entries": [
        {
            "author": "A. Author",
            "id": "https://www.bbc.co.uk/news/world-us-canada-48338168",
            "link": "https://www.bbc.co.uk/news/world-us-canada-48338168",
            "published": None,
            "published_parsed": None,
            "summary": "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",
        },
        {
            "author": "A. Author",
            "id": "https://www.bbc.co.uk/news/technology-48334739",
            "link": "https://www.bbc.co.uk/news/technology-48334739",
            "summary": "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",
        },
    ]
}

mock_without_url = {
    "entries": [
        {
            "author": "A. Author",
            "id": "https://www.bbc.co.uk/news/world-us-canada-48338168",
            "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.",
            "title": "Trump's 'genocidal taunts' will not end Iran - Zarif",
        },
        {
            "author": "A. Author",
            "id": "https://www.bbc.co.uk/news/technology-48334739",
            "link": None,
            "published": "Mon, 20 May 2019 16:07:37 GMT",
            "published_parsed": struct_time((2019, 5, 20, 16, 7, 37, 0, 140, 0)),
            "summary": "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",
        },
    ]
}

mock_without_body = {
    "entries": [
        {
            "author": "A. Author",
            "id": "https://www.bbc.co.uk/news/world-us-canada-48338168",
            "link": "https://www.bbc.co.uk/news/world-us-canada-48338168",
            "published": "Mon, 20 May 2019 16:07:37 GMT",
            "published_parsed": struct_time((2019, 5, 20, 16, 7, 37, 0, 140, 0)),
            "title": "Trump's 'genocidal taunts' will not end Iran - Zarif",
        },
        {
            "author": "A. Author",
            "id": "https://www.bbc.co.uk/news/uk-england-birmingham-48339080",
            "link": "https://www.bbc.co.uk/news/uk-england-birmingham-48339080",
            "published": "Mon, 20 May 2019 16:32:38 GMT",
            "published_parsed": struct_time((2019, 5, 20, 16, 32, 38, 0, 140, 0)),
            "summary": None,
            "title": "Birmingham head teacher threatened over LGBT lessons",
        },
    ]
}

mock_without_author = {
    "entries": [
        {
            "id": "https://www.bbc.co.uk/news/world-us-canada-48338168",
            "link": "https://www.bbc.co.uk/news/world-us-canada-48338168",
            "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.",
            "title": "Trump's 'genocidal taunts' will not end Iran - Zarif",
        },
        {
            "author": None,
            "id": "https://www.bbc.co.uk/news/technology-48334739",
            "link": "https://www.bbc.co.uk/news/technology-48334739",
            "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.",
            "title": "Huawei's Android loss: How it affects you",
        },
    ]
}

mock_without_entries = {"entries": []}

mock_with_update_entries = {
    "entries": [
        {
            "author": "A. Author",
            "id": "28f79ae4-8f9a-11e9-b143-00163ef6bee7",
            "link": "https://www.bbc.co.uk/news/world-us-canada-48338168",
            "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.",
            "title": "Trump's 'genocidal taunts' will not end Iran - Zarif",
        },
        {
            "author": "A. Author",
            "id": "a5479c66-8fae-11e9-8422-00163ef6bee7",
            "link": "https://www.bbc.co.uk/news/technology-48334739",
            "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.",
            "title": "Huawei's Android loss: How it affects you",
        },
        {
            "author": "A. Author",
            "id": "https://www.bbc.co.uk/news/uk-england-birmingham-48339080",
            "link": "https://www.bbc.co.uk/news/uk-england-birmingham-48339080",
            "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".',
            "title": "Birmingham head teacher threatened over LGBT lessons",
        },
    ]
}

mock_with_html = {
    "entries": [
        {
            "author": "A. Author",
            "id": "https://www.bbc.co.uk/news/world-us-canada-48338168",
            "link": "https://www.bbc.co.uk/news/world-us-canada-48338168",
            "published": "Mon, 20 May 2019 16:07:37 GMT",
            "published_parsed": struct_time((2019, 5, 20, 16, 7, 37, 0, 140, 0)),
            "summary": html_summary,
            "title": "Trump's 'genocidal taunts' will not end Iran - Zarif",
        }
    ]
}

mock_with_long_author = {
    "entries": [
        {
            "author": "A. Author but this author name is way to long for an actual surname.",
            "id": "https://www.bbc.co.uk/news/world-us-canada-48338168",
            "link": "https://www.bbc.co.uk/news/world-us-canada-48338168",
            "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.",
            "title": "Trump's 'genocidal taunts' will not end Iran - Zarif",
        }
    ]
}

mock_with_long_title = {
    "entries": [
        {
            "author": "A. Author",
            "id": "https://www.bbc.co.uk/news/world-us-canada-48338168",
            "link": "https://www.bbc.co.uk/news/world-us-canada-48338168",
            "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.",
            "title": "Trump's 'genocidal taunts' will not end Iran - Zarif"
            "Trump's 'genocidal taunts' will not end Iran - Zarif"
            "Trump's 'genocidal taunts' will not end Iran - Zarif"
            "Trump's 'genocidal taunts' will not end Iran - Zarif"
            "Trump's 'genocidal taunts' will not end Iran - Zarif"
            "Trump's 'genocidal taunts' will not end Iran - Zarif",
        }
    ]
}

mock_with_long_exotic_title = {
    "entries": [
        {
            "author": "A. Author",
            "id": "https://www.bbc.co.uk/news/world-us-canada-48338168",
            "link": "https://www.bbc.co.uk/news/world-us-canada-48338168",
            "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.",
            "title": "#ഡെബ്കോണ്‍ഫ്20 ഓണ്‍ലൈന്‍ അവസാന ദിവസം മലയാളം"
            "പരിപാടികളോടെയാണു് തുടങ്ങുന്നതു്: നെറ്റ്‌വര്‍ക്ക് വഴി കുറേ കമ്പ്യൂട്ടറുകളില്‍"
            "എളുപ്പത്തില്‍ ഡെബിയന്‍ ഇന്‍സ്റ്റോള്‍ ചെയ്യാം (ഉച്ചക്ക് ശേഷം 2:30 നു്),"
            "സ്വതന്ത്ര സോഫ്റ്റ്‌വെയറിൽ കേരളത്തിലെ സ്ത്രീകളുടെ പങ്കാളിത്തം (ഉച്ചക്ക്"
            "ശേഷം 3:30 നു്), ഗ്നു/ലിനക്സും ഗെയ്മിങ്ങും (വൈകുന്നേരം 4:30 നു്),"
            "കേരളത്തിലൊരു ഡെബ്കോൺഫ് (വൈകുന്നേരം 5:30 നു്) https://"
            "debconf20.debconf.org/schedule/?block=7",
        }
    ]
}

mock_with_longer_content_detail = {
    "entries": [
        {
            "author": "A. Author",
            "id": "https://www.bbc.co.uk/news/world-us-canada-48338168",
            "link": "https://www.bbc.co.uk/news/world-us-canada-48338168",
            "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.",
            "title": "Trump's 'genocidal taunts' will not end Iran - Zarif",
            "content": [
                {
                    "base": "",
                    "language": None,
                    "type": "text/html",
                    "value": '<div id="rss-wrap">\n'
                    '<figure class="intro-image '
                    'intro-left"><img '
                    'src="https://cdn.arstechnica.net/wp-content/uploads/2019/12/getty-ajit-pai-800x534.jpg" '
                    'alt="A photo of Ajit Pai."><p '
                    'class="caption" '
                    'style="font-size:0.8em"><a '
                    'href="https://cdn.arstechnica.net/wp-content/uploads/2019/12/getty-ajit-pai.jpg" '
                    'class="enlarge-link" data-height="683" '
                    'data-width="1024">Enlarge</a> <span '
                    'class="sep">/</span> Ajit Pai, chairman '
                    "of the Federal Communications Commission, "
                    "during an interview in New York, on "
                    "Tuesday, Nov. 5, 2019.  (credit: <a "
                    'rel="nofollow" class="caption-link" '
                    'href="https://www.gettyimages.com/">Getty '
                    "Images | Bloomberg</a>)</p>  "
                    "</figure>",
                }
            ],
        }
    ]
}

mock_with_shorter_content_detail = {
    "entries": [
        {
            "author": "A. Author",
            "id": "https://www.bbc.co.uk/news/world-us-canada-48338168",
            "link": "https://www.bbc.co.uk/news/world-us-canada-48338168",
            "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.",
            "title": "Trump's 'genocidal taunts' will not end Iran - Zarif",
            "content": [
                {
                    "base": "",
                    "language": None,
                    "type": "text/html",
                    "value": '<div id="rss-wrap"></div>',
                }
            ],
        }
    ]
}

mock_with_multiple_content_detail = {
    "entries": [
        {
            "author": "A. Author",
            "id": "https://www.bbc.co.uk/news/world-us-canada-48338168",
            "link": "https://www.bbc.co.uk/news/world-us-canada-48338168",
            "published": "Mon, 20 May 2019 16:07:37 GMT",
            "published_parsed": struct_time((2019, 5, 20, 16, 7, 37, 0, 140, 0)),
            "summary": "Foreign Min",
            "title": "Trump's 'genocidal taunts' will not end Iran - Zarif",
            "content": [
                {"base": "", "language": None, "type": "text/html", "value": "Yippie"},
                {"base": "", "language": None, "type": "text/html", "value": "Ya"},
                {"base": "", "language": None, "type": "text/html", "value": "Yee"},
            ],
        }
    ]
}
