summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2011-01-27 18:05:05 -0500
committerLance Stout <lancestout@gmail.com>2011-01-27 18:05:05 -0500
commitbd9bf3f1c7c17606f455ce0cf9c4d0b6b237a7fe (patch)
tree944aeaa34849e7fb6d822e9d3ff98b6db3a65546 /tests
parentcd800d636aa683dc562047bc517be7d1a9bb25c2 (diff)
downloadslixmpp-bd9bf3f1c7c17606f455ce0cf9c4d0b6b237a7fe.tar.gz
slixmpp-bd9bf3f1c7c17606f455ce0cf9c4d0b6b237a7fe.tar.bz2
slixmpp-bd9bf3f1c7c17606f455ce0cf9c4d0b6b237a7fe.tar.xz
slixmpp-bd9bf3f1c7c17606f455ce0cf9c4d0b6b237a7fe.zip
Update tostring methods.
Will now always show top-level namespace, unless it is the same as the stream's default namespace. Also added the XMPP stream namespace to the namespace map as 'stream'.
Diffstat (limited to 'tests')
-rw-r--r--tests/test_tostring.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/test_tostring.py b/tests/test_tostring.py
index 638e613a..e456d28e 100644
--- a/tests/test_tostring.py
+++ b/tests/test_tostring.py
@@ -102,11 +102,13 @@ class TestToString(SleekTest):
"""
Test that stanza objects are serialized properly.
"""
+ self.stream_start()
+
utf8_message = '\xe0\xb2\xa0_\xe0\xb2\xa0'
if not hasattr(utf8_message, 'decode'):
# Python 3
utf8_message = bytes(utf8_message, encoding='utf-8')
- msg = Message()
+ msg = self.Message()
msg['body'] = utf8_message.decode('utf-8')
expected = '<message><body>\xe0\xb2\xa0_\xe0\xb2\xa0</body></message>'
result = msg.__str__()