dosage/tests/test_rss.py
Tobias Gruetzmacher 27d28b8eef Update file headers
The default encoding for source files is UTF-8 since Python 3, so we can
drop all encoding headers. While we are at it, just replace them with
SPDX headers.
2020-04-18 13:45:44 +02:00

20 lines
496 B
Python

# SPDX-License-Identifier: MIT
# Copyright (C) 2019 Tobias Gruetzmacher
import time
from dosagelib.rss import parseFeed
class TestFeed(object):
"""
Tests for rss.py
"""
def test_parseFeed(self):
testTime = time.localtime(1560000000.0)
feed = parseFeed('./tests/mocks/dailydose.rss', testTime)
xmlBlob = feed.getXML()
assert u'PlumedDotage - 4034.png'.encode() in xmlBlob
assert u'PachinkoParlor - 20190626.jpg'.encode() not in xmlBlob