summaryrefslogtreecommitdiff
path: root/tests/test_stanza_xep_0444.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2021-01-10 11:27:48 +0100
committermathieui <mathieui@mathieui.net>2021-01-10 11:27:48 +0100
commitfb31e9c1fd47370ffec796d29f81264a9d8f197e (patch)
treec8c7abf69cea8ca1f76d1c28df671bd033a20188 /tests/test_stanza_xep_0444.py
parent525855c17b67392e7fa44812fc3f54dc212aec8c (diff)
parentb4dd1e0132d3b91125d3d8fc35e8e8510424b724 (diff)
downloadslixmpp-fb31e9c1fd47370ffec796d29f81264a9d8f197e.tar.gz
slixmpp-fb31e9c1fd47370ffec796d29f81264a9d8f197e.tar.bz2
slixmpp-fb31e9c1fd47370ffec796d29f81264a9d8f197e.tar.xz
slixmpp-fb31e9c1fd47370ffec796d29f81264a9d8f197e.zip
Merge branch 'test-skip-dependency' into 'master'
CI: Skip test if the emoji dep is not here See merge request poezio/slixmpp!96
Diffstat (limited to 'tests/test_stanza_xep_0444.py')
-rw-r--r--tests/test_stanza_xep_0444.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/tests/test_stanza_xep_0444.py b/tests/test_stanza_xep_0444.py
index 276460c5..0fe3f6fc 100644
--- a/tests/test_stanza_xep_0444.py
+++ b/tests/test_stanza_xep_0444.py
@@ -13,6 +13,11 @@ from slixmpp.plugins.xep_0444 import XEP_0444
import slixmpp.plugins.xep_0444.stanza as stanza
from slixmpp.xmlstream import register_stanza_plugin
+try:
+ import emoji
+except ImportError:
+ emoji = None
+
class TestReactions(SlixTest):
@@ -41,13 +46,9 @@ class TestReactions(SlixTest):
self.assertEqual({'😃', '🤗'}, msg['reactions']['values'])
+ @unittest.skipIf(emoji is None, 'Emoji package not installed')
def testCreateReactionsUnrestricted(self):
"""Testing creating Reactions with the extra all_chars arg."""
- try:
- import emoji
- except ImportError:
- # No emoji package: this test does not make sense
- return
xmlstring = """
<message>
<reactions xmlns="urn:xmpp:reactions:0" id="abcd">