diff options
author | Lance Stout <lancestout@gmail.com> | 2010-10-24 19:56:42 -0400 |
---|---|---|
committer | Lance Stout <lancestout@gmail.com> | 2010-10-24 19:56:42 -0400 |
commit | 03847497cc30b95708124d6c643d0ea2266196ef (patch) | |
tree | 0be1f5b85ad530d0f43144caab49fa44f91b3e69 | |
parent | 185d7cf28e06a162def8441289f19599d9b4f7c6 (diff) | |
download | slixmpp-03847497cc30b95708124d6c643d0ea2266196ef.tar.gz slixmpp-03847497cc30b95708124d6c643d0ea2266196ef.tar.bz2 slixmpp-03847497cc30b95708124d6c643d0ea2266196ef.tar.xz slixmpp-03847497cc30b95708124d6c643d0ea2266196ef.zip |
Added test for error stanzas.
-rw-r--r-- | tests/test_stanza_error.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/test_stanza_error.py b/tests/test_stanza_error.py index d5ed6f5f..b2d9817a 100644 --- a/tests/test_stanza_error.py +++ b/tests/test_stanza_error.py @@ -56,4 +56,21 @@ class TestErrorStanzas(SleekTest): </message> """, 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) |