From bd9bf3f1c7c17606f455ce0cf9c4d0b6b237a7fe Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Thu, 27 Jan 2011 18:05:05 -0500 Subject: 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'. --- tests/test_tostring.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tests/test_tostring.py') 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 = '\xe0\xb2\xa0_\xe0\xb2\xa0' result = msg.__str__() -- cgit v1.2.3