Fix whitespace issues, and make some debugging statements clearer.

This commit is contained in:
Lance Stout 2010-08-03 18:31:22 -04:00
parent 183a3f1b87
commit 956fdf6970

View file

@ -183,20 +183,21 @@ class SleekTest(unittest.TestCase):
setValues() will not be used.
"""
self.fix_namespaces(pres.xml, 'jabber:client')
debug = "Given Stanza:\n%s\n" % ET.tostring(pres.xml)
xml = ET.fromstring(xml_string)
self.fix_namespaces(xml, 'jabber:client')
debug += "XML String:\n%s\n" % ET.tostring(xml)
pres2 = self.Presence(xml)
debug += "Constructed Stanza:\n%s\n" % ET.tostring(pres2.xml)
# Ugly, but 'priority' has a default value and need to make
# sure it is set
pres['priority'] = pres['priority']
pres2['priority'] = pres2['priority']
debug = "Given Stanza:\n%s\n" % ET.tostring(pres.xml)
debug += "XML String:\n%s\n" % ET.tostring(xml)
debug += "Constructed Stanza:\n%s\n" % ET.tostring(pres2.xml)
if use_values:
values = pres.getStanzaValues()
pres3 = self.Presence()