diff --git a/plugins/RSS/test.py b/plugins/RSS/test.py
index adb25e87a..9012945ac 100644
--- a/plugins/RSS/test.py
+++ b/plugins/RSS/test.py
@@ -33,9 +33,9 @@ import feedparser
from supybot.test import *
import supybot.conf as conf
if sys.version_info[0] >= 3:
- from io import StringIO
+ from io import BytesIO
else:
- from cStringIO import StringIO
+ from cStringIO import StringIO as BytesIO
xkcd_old = """
xkcd.comhttp://xkcd.com/xkcd.com: A webcomic of romance and math humor.enSnake Factshttp://xkcd.com/1398/<img src="http://imgs.xkcd.com/comics/snake_facts.png" title="Biologically speaking, what we call a 'snake' is actually a human digestive tract which has escaped from its host." alt="Biologically speaking, what we call a 'snake' is actually a human digestive tract which has escaped from its host." />Wed, 23 Jul 2014 04:00:00 -0000http://xkcd.com/1398/
@@ -45,9 +45,12 @@ xkcd_new = """
xkcd.comhttp://xkcd.com/xkcd.com: A webcomic of romance and math humor.enChaoshttp://xkcd.com/1399/<img src="http://imgs.xkcd.com/comics/chaos.png" title="Although the oral exam for the doctorate was just 'can you do that weird laugh?'" alt="Although the oral exam for the doctorate was just 'can you do that weird laugh?'" />Fri, 25 Jul 2014 04:00:00 -0000http://xkcd.com/1399/Snake Factshttp://xkcd.com/1398/<img src="http://imgs.xkcd.com/comics/snake_facts.png" title="Biologically speaking, what we call a 'snake' is actually a human digestive tract which has escaped from its host." alt="Biologically speaking, what we call a 'snake' is actually a human digestive tract which has escaped from its host." />Wed, 23 Jul 2014 04:00:00 -0000http://xkcd.com/1398/
"""
+
def constant(content):
+ if sys.version_info[0] >= 3:
+ content = content.encode()
def f(*args, **kwargs):
- return StringIO(content)
+ return BytesIO(content)
return f
url = 'http://www.advogato.org/rss/articles.xml'