summaryrefslogtreecommitdiff
path: root/tests/test_tostring.py
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2012-07-24 03:25:55 -0700
committerLance Stout <lancestout@gmail.com>2012-07-24 03:25:55 -0700
commit9a08dfc7d4320638256a58daf6e02a433f1ee91c (patch)
tree23e1bf5316d01e10a1a5f44018689489661d8b5f /tests/test_tostring.py
parent3e43b36a9d70801d90a6b09046f93879f2e29b89 (diff)
downloadslixmpp-9a08dfc7d4320638256a58daf6e02a433f1ee91c.tar.gz
slixmpp-9a08dfc7d4320638256a58daf6e02a433f1ee91c.tar.bz2
slixmpp-9a08dfc7d4320638256a58daf6e02a433f1ee91c.tar.xz
slixmpp-9a08dfc7d4320638256a58daf6e02a433f1ee91c.zip
Add support for using CDATA for escaping.
CDATA escaping is disabled by default, but may be enabled by setting: self.use_cdata = True Closes issue #114
Diffstat (limited to 'tests/test_tostring.py')
-rw-r--r--tests/test_tostring.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test_tostring.py b/tests/test_tostring.py
index e456d28e..cd50a7c1 100644
--- a/tests/test_tostring.py
+++ b/tests/test_tostring.py
@@ -1,7 +1,7 @@
from sleekxmpp.test import *
from sleekxmpp.stanza import Message
from sleekxmpp.xmlstream.stanzabase import ET, ElementBase
-from sleekxmpp.xmlstream.tostring import tostring, xml_escape
+from sleekxmpp.xmlstream.tostring import tostring, escape
class TestToString(SleekTest):
@@ -30,7 +30,7 @@ class TestToString(SleekTest):
def testXMLEscape(self):
"""Test escaping XML special characters."""
original = """<foo bar="baz">'Hi & welcome!'</foo>"""
- escaped = xml_escape(original)
+ escaped = escape(original)
desired = """&lt;foo bar=&quot;baz&quot;&gt;&apos;Hi"""
desired += """ &amp; welcome!&apos;&lt;/foo&gt;"""