Merge branch 'fixDomainOnCategory' of https://github.com/pzelnip/python-feedgen

Signed-off-by: Lars Kiesow <lkiesow@uos.de>
This commit is contained in:
Lars Kiesow 2015-10-28 23:04:51 +01:00
commit 303c047697
No known key found for this signature in database
GPG key ID: 5DAFE8D9C823CE73

View file

@ -75,3 +75,20 @@ class TestSequenceFunctions(unittest.TestCase):
assert len(fg.entry()) == 1
fg.remove_entry(fe)
assert len(fg.entry()) == 0
def test_categoryHasDomain(self):
fg = FeedGenerator()
fg.title('some title')
fg.link( href='http://www.dontcare.com', rel='alternate' )
fg.description('description')
fe = fg.add_entry()
fe.id('http://lernfunk.de/media/654321/1')
fe.title('some title')
fe.category([
{'term' : 'category',
'scheme': 'http://www.somedomain.com/category',
'label' : 'Category',
}])
result = fg.rss_str()
assert 'domain="http://www.somedomain.com/category"' in result