diff --git a/slixmpp/basexmpp.py b/slixmpp/basexmpp.py index c54ec63a..c0da516f 100644 --- a/slixmpp/basexmpp.py +++ b/slixmpp/basexmpp.py @@ -279,10 +279,10 @@ class BaseXMPP(XMLStream): if self.plugin_whitelist: plugin_list = self.plugin_whitelist else: - plugin_list = plugins.__all__ + plugin_list = plugins.PLUGINS for plugin in plugin_list: - if plugin in plugins.__all__: + if plugin in plugins.PLUGINS: self.register_plugin(plugin) else: raise NameError("Plugin %s not in plugins.__all__." % plugin) diff --git a/slixmpp/plugins/__init__.py b/slixmpp/plugins/__init__.py index 232f0584..206ac5a7 100644 --- a/slixmpp/plugins/__init__.py +++ b/slixmpp/plugins/__init__.py @@ -6,7 +6,7 @@ from slixmpp.plugins.base import PluginManager, PluginNotFound, BasePlugin from slixmpp.plugins.base import register_plugin, load_plugin -__all__ = [ +PLUGINS = [ # XEPS 'xep_0004', # Data Forms 'xep_0009', # Jabber-RPC @@ -116,5 +116,12 @@ __all__ = [ 'xep_0444', # Message Reactions 'xep_0461', # Message Replies # Meant to be imported by plugins - 'BasePlugin' +] + +__all__ = PLUGINS + [ + 'PluginManager', + 'PluginNotFound', + 'BasePlugin', + 'register_plugin', + 'load_plugin', ] diff --git a/tests/test_stanza_xep_0292.py b/tests/test_stanza_xep_0292.py index 8b2467fb..48606c92 100644 --- a/tests/test_stanza_xep_0292.py +++ b/tests/test_stanza_xep_0292.py @@ -1,4 +1,5 @@ import datetime +import unittest from slixmpp import Iq from slixmpp.test import SlixTest @@ -116,3 +117,5 @@ class TestVcard(SlixTest): """, use_values=False ) + +suite = unittest.TestLoader().loadTestsFromTestCase(TestVcard) diff --git a/tests/test_stanza_xep_0461.py b/tests/test_stanza_xep_0461.py index e43b8138..f6f21210 100644 --- a/tests/test_stanza_xep_0461.py +++ b/tests/test_stanza_xep_0461.py @@ -33,7 +33,7 @@ class TestReply(SlixTest): self.check( message, """ - M + 12345\nrealbody