From 859822ff05c0c19cc16965918ef1d76eb8e531cb Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Mon, 19 Mar 2012 14:24:45 -0700 Subject: Fix unicode issues in test cases for Py3+ introduced by issue #150. --- tests/test_stanza_xep_0009.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/test_stanza_xep_0009.py b/tests/test_stanza_xep_0009.py index 724ebb95..fa1ed19b 100644 --- a/tests/test_stanza_xep_0009.py +++ b/tests/test_stanza_xep_0009.py @@ -8,7 +8,10 @@ See the file LICENSE for copying permission. """ +from __future__ import unicode_literals + import base64 +import sys from sleekxmpp.plugins.xep_0009.stanza.RPC import RPCQuery, MethodCall, \ MethodResponse @@ -21,6 +24,9 @@ from sleekxmpp.xmlstream.tostring import tostring import unittest +if sys.version_info > (3, 0): + unicode = str + class TestJabberRPC(SleekTest): @@ -117,7 +123,7 @@ class TestJabberRPC(SleekTest): "XML to string conversion") def testConvertUnicodeString(self): - params = [u"おはよう"] + params = ["おはよう"] params_xml = py2xml(*params) expected_xml = self.parse_xml(""" -- cgit v1.2.3