Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added test for error stanzas.

  • Loading branch information...
commit 03847497cc30b95708124d6c643d0ea2266196ef 1 parent 185d7cf
@legastero legastero authored
Showing with 17 additions and 0 deletions.
  1. +17 −0 tests/test_stanza_error.py
View
17 tests/test_stanza_error.py
@@ -56,4 +56,21 @@ def testDelCondition(self):
</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)
Please sign in to comment.
Something went wrong with that request. Please try again.