Mercurial > libervia-backend
comparison tests/unit/test_plugin_xep_0373.py @ 4069:3d91d0aa68db
tests (unit): Skip XEP-0373 test if gpg can't be imported
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 01 Jun 2023 21:37:34 +0200 |
parents | cecf45416403 |
children | 4b842c1fb686 |
comparison
equal
deleted
inserted
replaced
4068:5241267a92b3 | 4069:3d91d0aa68db |
---|---|
1 from datetime import datetime, timedelta, timezone | 1 from datetime import datetime, timedelta, timezone |
2 from sat.plugins.plugin_xep_0373 import XEP_0373, NS_OX | |
3 from sat.tools.xmpp_datetime import parse_datetime | |
4 | 2 |
5 import pytest | 3 import pytest |
4 from sat.core import exceptions | |
5 try: | |
6 from sat.plugins.plugin_xep_0373 import XEP_0373, NS_OX | |
7 except exceptions.MissingModule as e: | |
8 pytest.skip(f"Can't test XEP-0373: {e}", allow_module_level=True) | |
9 from sat.tools.xmpp_datetime import parse_datetime | |
6 from twisted.words.protocols.jabber import jid | 10 from twisted.words.protocols.jabber import jid |
7 | 11 |
8 | 12 |
9 a = jid.JID("foo@example.com") | 13 a = jid.JID("foo@example.com") |
10 b = jid.JID("bar@example.com") | 14 b = jid.JID("bar@example.com") |