From 86a8b6923312da97262c5d635df39fcbe05c48c2 Mon Sep 17 00:00:00 2001 From: Lars Kiesow Date: Thu, 29 Oct 2015 00:39:57 +0100 Subject: [PATCH] Fix Python 3 Test Issues Signed-off-by: Lars Kiesow --- feedgen/tests/test_entry.py | 2 +- feedgen/tests/test_feed.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/feedgen/tests/test_entry.py b/feedgen/tests/test_entry.py index 4fa768e..d2fef27 100644 --- a/feedgen/tests/test_entry.py +++ b/feedgen/tests/test_entry.py @@ -91,4 +91,4 @@ class TestSequenceFunctions(unittest.TestCase): }]) result = fg.rss_str() - assert 'domain="http://www.somedomain.com/category"' in result + assert b'domain="http://www.somedomain.com/category"' in result diff --git a/feedgen/tests/test_feed.py b/feedgen/tests/test_feed.py index 757497c..33f82f7 100644 --- a/feedgen/tests/test_feed.py +++ b/feedgen/tests/test_feed.py @@ -120,7 +120,7 @@ class TestSequenceFunctions(unittest.TestCase): def test_atomFeedFile(self): fg = self.fg filename = 'tmp_Atomfeed.xml' - fg.atom_file(filename=filename, pretty=True) + fg.atom_file(filename=filename, pretty=True, xml_declaration=False) with open (filename, "r") as myfile: atomString=myfile.read().replace('\n', '') @@ -130,7 +130,7 @@ class TestSequenceFunctions(unittest.TestCase): def test_atomFeedString(self): fg = self.fg - atomString = fg.atom_str(pretty=True) + atomString = fg.atom_str(pretty=True, xml_declaration=False) self.checkAtomString(atomString) @@ -162,7 +162,7 @@ class TestSequenceFunctions(unittest.TestCase): def test_rssFeedFile(self): fg = self.fg filename = 'tmp_Rssfeed.xml' - fg.rss_file(filename=filename, pretty=True) + fg.rss_file(filename=filename, pretty=True, xml_declaration=False) with open (filename, "r") as myfile: rssString=myfile.read().replace('\n', '') @@ -171,7 +171,7 @@ class TestSequenceFunctions(unittest.TestCase): def test_rssFeedString(self): fg = self.fg - rssString = fg.rss_str(pretty=True) + rssString = fg.rss_str(pretty=True, xml_declaration=False) self.checkRssString(rssString) def test_loadPodcastExtension(self):