2020-04-18 11:45:44 +00:00
|
|
|
# SPDX-License-Identifier: MIT
|
2019-11-03 23:16:25 +00:00
|
|
|
# Copyright (C) 2019 Tobias Gruetzmacher
|
2019-10-28 15:48:21 +00:00
|
|
|
import time
|
|
|
|
from dosagelib.rss import parseFeed
|
|
|
|
|
2019-11-03 23:16:25 +00:00
|
|
|
|
2019-10-28 15:48:21 +00:00
|
|
|
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
|