# HG changeset patch # User Goffi # Date 1685648254 -7200 # Node ID 3d91d0aa68db471138b415f64542eb3aad71471c # Parent 5241267a92b3543148b329b9757d2bce237f21f6 tests (unit): Skip XEP-0373 test if gpg can't be imported diff -r 5241267a92b3 -r 3d91d0aa68db tests/unit/test_plugin_xep_0373.py --- a/tests/unit/test_plugin_xep_0373.py Thu Jun 01 21:37:31 2023 +0200 +++ b/tests/unit/test_plugin_xep_0373.py Thu Jun 01 21:37:34 2023 +0200 @@ -1,8 +1,12 @@ from datetime import datetime, timedelta, timezone -from sat.plugins.plugin_xep_0373 import XEP_0373, NS_OX -from sat.tools.xmpp_datetime import parse_datetime import pytest +from sat.core import exceptions +try: + from sat.plugins.plugin_xep_0373 import XEP_0373, NS_OX +except exceptions.MissingModule as e: + pytest.skip(f"Can't test XEP-0373: {e}", allow_module_level=True) +from sat.tools.xmpp_datetime import parse_datetime from twisted.words.protocols.jabber import jid