summaryrefslogtreecommitdiff
path: root/tests/sleektest.py
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2010-08-27 15:48:48 -0400
committerLance Stout <lancestout@gmail.com>2010-08-27 15:48:48 -0400
commit906aa0bd6896d119bcbabc6e21de31c2171316b9 (patch)
treea8f374eabf266998fa6faabaf96a5c7d7c2b5d0a /tests/sleektest.py
parentbb6f4af8e24f940a837c227b0f2fab2b64e4dc7e (diff)
downloadslixmpp-906aa0bd6896d119bcbabc6e21de31c2171316b9.tar.gz
slixmpp-906aa0bd6896d119bcbabc6e21de31c2171316b9.tar.bz2
slixmpp-906aa0bd6896d119bcbabc6e21de31c2171316b9.tar.xz
slixmpp-906aa0bd6896d119bcbabc6e21de31c2171316b9.zip
Fixed SleekTest compare method to check XML text.
Corrected resulting test failures. All pass again.
Diffstat (limited to 'tests/sleektest.py')
-rw-r--r--tests/sleektest.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/sleektest.py b/tests/sleektest.py
index 801253d3..66535bcb 100644
--- a/tests/sleektest.py
+++ b/tests/sleektest.py
@@ -504,7 +504,18 @@ class SleekTest(unittest.TestCase):
if xml.attrib != other.attrib:
return False
- # Step 3: Recursively check children
+ # Step 3: Check text
+ if xml.text is None:
+ xml.text = ""
+ if other.text is None:
+ other.text = ""
+ xml.text = xml.text.strip()
+ other.text = other.text.strip()
+
+ if xml.text != other.text:
+ return False
+
+ # Step 4: Recursively check children
for child in xml:
child2s = other.findall("%s" % child.tag)
if child2s is None: