Corrected test errors.
There was a bug in the XML compare method.
This commit is contained in:
0
tests/__init__.py
Normal file
0
tests/__init__.py
Normal file
@@ -607,7 +607,7 @@ class TestElementBase(SleekTest):
|
||||
<foo xmlns="foo">
|
||||
<foobar qux="a" />
|
||||
</foo>
|
||||
""")
|
||||
""", use_values=False)
|
||||
self.failUnless(len(stanza) == 1,
|
||||
"Incorrect stanza size with 1 substanza.")
|
||||
|
||||
@@ -617,7 +617,7 @@ class TestElementBase(SleekTest):
|
||||
<foobar qux="a" />
|
||||
<foobar qux="b" />
|
||||
</foo>
|
||||
""")
|
||||
""", use_values=False)
|
||||
self.failUnless(len(stanza) == 2,
|
||||
"Incorrect stanza size with 2 substanzas.")
|
||||
|
||||
@@ -627,7 +627,7 @@ class TestElementBase(SleekTest):
|
||||
<foo xmlns="foo">
|
||||
<foobar qux="b" />
|
||||
</foo>
|
||||
""")
|
||||
""", use_values=False)
|
||||
|
||||
# Test iterating over substanzas
|
||||
stanza.append(substanza1)
|
||||
|
||||
@@ -30,11 +30,13 @@ class TestErrorStanzas(SleekTest):
|
||||
|
||||
self.failUnless(msg['error']['condition'] == 'item-not-found', "Error condition doesn't match.")
|
||||
|
||||
del msg['error']['condition']
|
||||
msg['error']['condition'] = 'resource-constraint'
|
||||
|
||||
self.check_message(msg, """
|
||||
<message type="error">
|
||||
<error type="cancel" />
|
||||
<error type="cancel">
|
||||
<resource-constraint xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" />
|
||||
</error>
|
||||
</message>
|
||||
""")
|
||||
|
||||
@@ -52,6 +54,6 @@ class TestErrorStanzas(SleekTest):
|
||||
<text xmlns="urn:ietf:params:xml:ns:xmpp-stanzas">Error!</text>
|
||||
</error>
|
||||
</message>
|
||||
""")
|
||||
""", use_values=False)
|
||||
|
||||
suite = unittest.TestLoader().loadTestsFromTestCase(TestErrorStanzas)
|
||||
|
||||
@@ -25,7 +25,7 @@ class TestGmail(SleekTest):
|
||||
newer-than-tid="11134623426430234"
|
||||
q="is:starred" />
|
||||
</iq>
|
||||
""")
|
||||
""", use_values=False)
|
||||
|
||||
def testMailBox(self):
|
||||
"""Testing reading from Gmail mailbox result"""
|
||||
|
||||
Reference in New Issue
Block a user