summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2010-10-24 19:56:42 -0400
committerLance Stout <lancestout@gmail.com>2010-10-24 19:56:42 -0400
commit03847497cc30b95708124d6c643d0ea2266196ef (patch)
tree0be1f5b85ad530d0f43144caab49fa44f91b3e69 /tests
parent185d7cf28e06a162def8441289f19599d9b4f7c6 (diff)
downloadslixmpp-03847497cc30b95708124d6c643d0ea2266196ef.tar.gz
slixmpp-03847497cc30b95708124d6c643d0ea2266196ef.tar.bz2
slixmpp-03847497cc30b95708124d6c643d0ea2266196ef.tar.xz
slixmpp-03847497cc30b95708124d6c643d0ea2266196ef.zip
Added test for error stanzas.
Diffstat (limited to 'tests')
-rw-r--r--tests/test_stanza_error.py17
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)