plugin XEP-0373 and XEP-0374: Implementation of OX and OXIM:

GPGME is used as the GPG provider.

rel 374
This commit is contained in:
Syndace 2022-09-20 16:22:18 +02:00
commit 6d1e942f43

View file

@ -19,6 +19,7 @@
from datetime import date, datetime, time, timezone
import pytest
from sat.core import exceptions
from sat.plugins.plugin_xep_0082 import XEP_0082
@ -104,7 +105,7 @@ def test_datetime_parsing() -> None: # pylint: disable=missing-function-docstri
assert XEP_0082.parse_datetime("1969-07-20T21:56:15-05:00") == value
# Without timezone, without a fraction of a second
with pytest.raises(ValueError):
with pytest.raises(exceptions.ParsingError):
XEP_0082.parse_datetime("1969-07-21T02:56:15")
# With timezone 'Z', with a fraction of a second consisting of two digits
@ -123,7 +124,7 @@ def test_datetime_parsing() -> None: # pylint: disable=missing-function-docstri
assert XEP_0082.parse_datetime("1969-07-20T21:56:15.-05:00") == value
# Without timezone, with a fraction of a second consisting of six digits
with pytest.raises(ValueError):
with pytest.raises(exceptions.ParsingError):
XEP_0082.parse_datetime("1969-07-21T02:56:15.123456")