dosage/tests/test_rss.py
Mikkel Høgh 0dea216851 Fix missing returns in RSS parsing (#137)
Also added a very basic test for feed parsing.
2019-10-28 16:48:21 +01:00

21 lines
514 B
Python

from __future__ import absolute_import, division, print_function
import pytest
import re
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