diff options
-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) |