From 03847497cc30b95708124d6c643d0ea2266196ef Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Sun, 24 Oct 2010 19:56:42 -0400 Subject: [PATCH] Added test for error stanzas. --- tests/test_stanza_error.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tests/test_stanza_error.py b/tests/test_stanza_error.py index d5ed6f5..b2d9817 100644 --- a/tests/test_stanza_error.py +++ b/tests/test_stanza_error.py @@ -56,4 +56,21 @@ class TestErrorStanzas(SleekTest): """, 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, """ + + + + + + """) + + suite = unittest.TestLoader().loadTestsFromTestCase(TestErrorStanzas)