From fdb0749cd14ea9480687d5e243ec8fc81731e4dd Mon Sep 17 00:00:00 2001 From: mathieui Date: Fri, 4 Dec 2020 18:45:06 +0100 Subject: XEP-0422,0424,0425,0439: Add basic stanza tests --- tests/test_stanza_xep_0424.py | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 tests/test_stanza_xep_0424.py (limited to 'tests/test_stanza_xep_0424.py') diff --git a/tests/test_stanza_xep_0424.py b/tests/test_stanza_xep_0424.py new file mode 100644 index 00000000..c94ed79b --- /dev/null +++ b/tests/test_stanza_xep_0424.py @@ -0,0 +1,39 @@ +import unittest +from slixmpp import Message +from slixmpp.test import SlixTest +from slixmpp.plugins.xep_0424 import stanza + + +class TestRetraction(SlixTest): + + def setUp(self): + stanza.register_plugins() + + def testRetract(self): + message = Message() + message['apply_to']['id'] = 'some-id' + message['apply_to']['retract'] + + self.check(message, """ + + + + + + """, use_values=False) + + def testRetracted(self): + message = Message() + message['retracted']['stamp'] = '2019-09-20T23:09:32Z' + message['retracted']['origin_id']['id'] = 'originid' + + self.check(message, """ + + + + + + """) + + +suite = unittest.TestLoader().loadTestsFromTestCase(TestRetraction) -- cgit v1.2.3