Пример #1
0
def test_get_feed_entries(inp):
    first, last = tuple(get_feed_entries())

    assert first.date == date(year=2018, month=2, day=18)
    assert first.title == 'Twitter Digest 2018 Week 08'
    assert first.link == 'https://pybit.es/twitter_digest_201808.html'
    expected = ['flask', 'python', 'regex', 'twitter']
    # allow list or set
    assert sorted(list(first.tags)) == expected

    assert last.date == date(year=2017, month=1, day=6)
    assert last.title == 'Copy and Paste with Pyperclip'
    assert last.link == 'https://pybit.es/pyperclip.html'
    expected = ['code', 'pybites', 'python', 'tips', 'tricks']
    assert sorted(list(last.tags)) == expected
Пример #2
0
def test_get_feed_entries(inp):
    first, last = tuple(get_feed_entries())

    assert first.date == date(year=2018, month=2, day=18)
    assert first.title == "Twitter Digest 2018 Week 08"
    assert first.link == "https://pybit.es/twitter_digest_201808.html"
    expected = ["flask", "python", "regex", "twitter"]
    # allow list or set
    assert sorted(list(first.tags)) == expected

    assert last.date == date(year=2017, month=1, day=6)
    assert last.title == "Copy and Paste with Pyperclip"
    assert last.link == "https://pybit.es/pyperclip.html"
    expected = ["code", "pybites", "python", "tips", "tricks"]
    assert sorted(list(last.tags)) == expected