Fix xml:lang tostring test.

This commit is contained in:
Lance Stout 2010-12-08 00:18:04 -05:00
parent f474d378ef
commit 8d4e77aba6

View file

@ -10,6 +10,9 @@ class TestToString(SleekTest):
Test the implementation of sleekxmpp.xmlstream.tostring Test the implementation of sleekxmpp.xmlstream.tostring
""" """
def tearDown(self):
self.stream_close()
def tryTostring(self, original='', expected=None, message='', **kwargs): def tryTostring(self, original='', expected=None, message='', **kwargs):
""" """
Compare the result of calling tostring against an Compare the result of calling tostring against an
@ -113,6 +116,8 @@ class TestToString(SleekTest):
def testXMLLang(self): def testXMLLang(self):
"""Test that serializing xml:lang works.""" """Test that serializing xml:lang works."""
self.stream_start()
msg = self.Message() msg = self.Message()
msg._set_attr('{%s}lang' % msg.xml_ns, "no") msg._set_attr('{%s}lang' % msg.xml_ns, "no")