Fixed feedgenerator tests under hash randomization
This commit is contained in:
parent
195bc37f1d
commit
46d27a6b8d
|
@ -104,10 +104,14 @@ class FeedgeneratorTest(unittest.TestCase):
|
||||||
feed = feedgenerator.Rss201rev2Feed('title', '/link/', 'descr')
|
feed = feedgenerator.Rss201rev2Feed('title', '/link/', 'descr')
|
||||||
self.assertEqual(feed.feed['feed_url'], None)
|
self.assertEqual(feed.feed['feed_url'], None)
|
||||||
feed_content = feed.writeString('utf-8')
|
feed_content = feed.writeString('utf-8')
|
||||||
self.assertNotIn('<atom:link href=', feed_content)
|
self.assertNotIn('<atom:link', feed_content)
|
||||||
|
self.assertNotIn('href="/feed/"', feed_content)
|
||||||
|
self.assertNotIn('rel="self"', feed_content)
|
||||||
|
|
||||||
def test_feed_with_feed_url_gets_rendered_with_atom_link(self):
|
def test_feed_with_feed_url_gets_rendered_with_atom_link(self):
|
||||||
feed = feedgenerator.Rss201rev2Feed('title', '/link/', 'descr', feed_url='/feed/')
|
feed = feedgenerator.Rss201rev2Feed('title', '/link/', 'descr', feed_url='/feed/')
|
||||||
self.assertEqual(feed.feed['feed_url'], '/feed/')
|
self.assertEqual(feed.feed['feed_url'], '/feed/')
|
||||||
feed_content = feed.writeString('utf-8')
|
feed_content = feed.writeString('utf-8')
|
||||||
self.assertIn('<atom:link href="/feed/" rel="self"></atom:link>', feed_content)
|
self.assertIn('<atom:link', feed_content)
|
||||||
|
self.assertIn('href="/feed/"', feed_content)
|
||||||
|
self.assertIn('rel="self"', feed_content)
|
||||||
|
|
Loading…
Reference in New Issue