Mercurial > libervia-backend
diff tests/unit/test_plugin_xep_0082.py @ 3933:cecf45416403
plugin XEP-0373 and XEP-0374: Implementation of OX and OXIM:
GPGME is used as the GPG provider.
rel 374
author | Syndace <me@syndace.dev> |
---|---|
date | Tue, 20 Sep 2022 16:22:18 +0200 |
parents | 8289ac1b34f4 |
children | 4b842c1fb686 |
line wrap: on
line diff
--- a/tests/unit/test_plugin_xep_0082.py Mon Oct 10 15:23:59 2022 +0200 +++ b/tests/unit/test_plugin_xep_0082.py Tue Sep 20 16:22:18 2022 +0200 @@ -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 @@ 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 @@ 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")