summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--slixmpp/test/integration.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/slixmpp/test/integration.py b/slixmpp/test/integration.py
index 758ad239..7da3f86a 100644
--- a/slixmpp/test/integration.py
+++ b/slixmpp/test/integration.py
@@ -16,7 +16,9 @@ except ImportError:
# not usable.
from unittest import TestCase as IsolatedAsyncioTestCase
from typing import (
+ Dict,
List,
+ Optional,
)
from slixmpp import JID
@@ -39,11 +41,14 @@ class SlixIntegration(IsolatedAsyncioTestCase):
"""get a str from an env var"""
return os.getenv(name)
- def register_plugins(self, plugins: List[str]):
+ def register_plugins(self, plugins: List[str], configs: Optional[List[Dict]] = None):
"""Register plugins on all known clients"""
- for plugin in plugins:
+ for index, plugin in enumerate(plugins):
for client in self.clients:
- client.register_plugin(plugin)
+ if configs is not None:
+ client.register_plugin(plugin, pconfig=configs[index])
+ else:
+ client.register_plugin(plugin)
def add_client(self, jid: JID, password: str):
"""Register a new client"""