mirror of
https://github.com/correl/SleekXMPP.git
synced 2024-11-27 19:19:54 +00:00
Added test for error stanzas.
This commit is contained in:
parent
185d7cf28e
commit
03847497cc
1 changed files with 17 additions and 0 deletions
|
@ -56,4 +56,21 @@ class TestErrorStanzas(SleekTest):
|
||||||
</message>
|
</message>
|
||||||
""", use_values=False)
|
""", use_values=False)
|
||||||
|
|
||||||
|
def testDelText(self):
|
||||||
|
"""Test deleting the text of an error."""
|
||||||
|
msg = self.Message()
|
||||||
|
msg['error']['test'] = 'Error!'
|
||||||
|
msg['error']['condition'] = 'internal-server-error'
|
||||||
|
|
||||||
|
del msg['error']['text']
|
||||||
|
|
||||||
|
self.check_message(msg, """
|
||||||
|
<message type="error">
|
||||||
|
<error type="cancel">
|
||||||
|
<internal-server-error xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" />
|
||||||
|
</error>
|
||||||
|
</message>
|
||||||
|
""")
|
||||||
|
|
||||||
|
|
||||||
suite = unittest.TestLoader().loadTestsFromTestCase(TestErrorStanzas)
|
suite = unittest.TestLoader().loadTestsFromTestCase(TestErrorStanzas)
|
||||||
|
|
Loading…
Reference in a new issue