summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2021-02-19 19:06:41 +0100
committermathieui <mathieui@mathieui.net>2021-02-19 19:06:41 +0100
commit2ba89727a6627f86e66ec4f3baba464da1b0b19c (patch)
treed18c9e4bccc85d3c5770515966ce9866f8bc39dc
parent626bf5ff8ac5bc4c8758cd437e52f4e7c86ec179 (diff)
parenta397cc3a7d824d7c5bdfbe316b78deb17e190ecd (diff)
downloadslixmpp-2ba89727a6627f86e66ec4f3baba464da1b0b19c.tar.gz
slixmpp-2ba89727a6627f86e66ec4f3baba464da1b0b19c.tar.bz2
slixmpp-2ba89727a6627f86e66ec4f3baba464da1b0b19c.tar.xz
slixmpp-2ba89727a6627f86e66ec4f3baba464da1b0b19c.zip
Merge branch 'fix-test-order-race' into 'master'
tests: fix prerequisites for stanza tests See merge request poezio/slixmpp!134
-rw-r--r--tests/test_stanza_message.py2
-rw-r--r--tests/test_stanza_presence.py6
-rw-r--r--tests/test_stanza_xep_0060.py9
-rw-r--r--tests/test_stanza_xep_0424.py2
4 files changed, 19 insertions, 0 deletions
diff --git a/tests/test_stanza_message.py b/tests/test_stanza_message.py
index 0bedac43..298c2985 100644
--- a/tests/test_stanza_message.py
+++ b/tests/test_stanza_message.py
@@ -2,6 +2,7 @@ import unittest
from slixmpp.test import SlixTest
from slixmpp.stanza.message import Message
from slixmpp.stanza.htmlim import HTMLIM
+from slixmpp.plugins.xep_0172 import UserNick
from slixmpp.xmlstream import register_stanza_plugin
@@ -9,6 +10,7 @@ class TestMessageStanzas(SlixTest):
def setUp(self):
register_stanza_plugin(Message, HTMLIM)
+ register_stanza_plugin(Message, UserNick)
def testGroupchatReplyRegression(self):
"Regression groupchat reply should be to barejid"
diff --git a/tests/test_stanza_presence.py b/tests/test_stanza_presence.py
index 7bb41b3a..ff0f4fb2 100644
--- a/tests/test_stanza_presence.py
+++ b/tests/test_stanza_presence.py
@@ -2,6 +2,12 @@ import unittest
import slixmpp
from slixmpp.test import SlixTest
+from slixmpp.plugins.xep_0172 import UserNick
+from slixmpp.xmlstream import register_stanza_plugin
+from slixmpp.stanza import Presence
+
+register_stanza_plugin(Presence, UserNick)
+
class TestPresenceStanzas(SlixTest):
def testPresenceShowRegression(self):
diff --git a/tests/test_stanza_xep_0060.py b/tests/test_stanza_xep_0060.py
index 2a5f7d84..d05bc3d0 100644
--- a/tests/test_stanza_xep_0060.py
+++ b/tests/test_stanza_xep_0060.py
@@ -3,10 +3,19 @@ from slixmpp.test import SlixTest
import slixmpp.plugins.xep_0004 as xep_0004
import slixmpp.plugins.xep_0060.stanza as pubsub
from slixmpp.xmlstream.stanzabase import ET
+from slixmpp.xmlstream import register_stanza_plugin
class TestPubsubStanzas(SlixTest):
+ def setUp(self):
+ register_stanza_plugin(
+ xep_0004.FormField, xep_0004.FieldOption, iterable=True
+ )
+ register_stanza_plugin(
+ xep_0004.Form, xep_0004.FormField, iterable=True
+ )
+
def testAffiliations(self):
"Testing iq/pubsub/affiliations/affiliation stanzas"
iq = self.Iq()
diff --git a/tests/test_stanza_xep_0424.py b/tests/test_stanza_xep_0424.py
index c94ed79b..684632d6 100644
--- a/tests/test_stanza_xep_0424.py
+++ b/tests/test_stanza_xep_0424.py
@@ -2,11 +2,13 @@ import unittest
from slixmpp import Message
from slixmpp.test import SlixTest
from slixmpp.plugins.xep_0424 import stanza
+from slixmpp.plugins.xep_0422 import stanza as astanza
class TestRetraction(SlixTest):
def setUp(self):
+ astanza.register_plugins()
stanza.register_plugins()
def testRetract(self):