From 5e47286445bcac36fde7be35d24765184140b036 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Tue, 4 Apr 2023 12:07:56 +0200 Subject: [PATCH] XEP-0377: Update tests against the latest version --- tests/test_stanza_xep_0377.py | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/tests/test_stanza_xep_0377.py b/tests/test_stanza_xep_0377.py index 321a26a8..b7770517 100644 --- a/tests/test_stanza_xep_0377.py +++ b/tests/test_stanza_xep_0377.py @@ -23,34 +23,30 @@ class TestSpamReporting(SlixTest): report = """ - - - + """ iq = self.Iq() iq['type'] = 'set' - iq['block']['report']['spam'] = True + iq['block']['report']['reason'] = xep_0377.XEP_0377.SPAM - self.check(iq, report) + self.check(iq, report, use_values=False) def testEnforceOnlyOneSubElement(self): report = """ - - - + """ iq = self.Iq() iq['type'] = 'set' - iq['block']['report']['spam'] = True - iq['block']['report']['abuse'] = True - self.check(iq, report) + iq['block']['report']['reason'] = xep_0377.XEP_0377.SPAM + iq['block']['report']['reason'] = xep_0377.XEP_0377.ABUSE + self.check(iq, report, use_values=False) suite = unittest.TestLoader().loadTestsFromTestCase(TestSpamReporting)