File: test_rss.py

package info (click to toggle)
dosage 3.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,400 kB
  • sloc: python: 12,703; sh: 55; makefile: 6
file content (19 lines) | stat: -rw-r--r-- 496 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# 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