[1.5.x] Fixed feedgenerator tests under hash randomization
Backport of 46d27a6
from master.
This commit is contained in:
parent
1b4b0dc013
commit
d1e59794d1
|
@ -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