tests: fix prerequisites for stanza tests
This commit is contained in:
parent
626bf5ff8a
commit
a397cc3a7d
4 changed files with 19 additions and 0 deletions
|
@ -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"
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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):
|
||||
|
|
Loading…
Reference in a new issue