mirror of
https://github.com/progval/irctest.git
synced 2025-04-04 22:39:50 +00:00
Make the dependency on ecdsa optional
This commit is contained in:
@ -1,7 +1,12 @@
|
||||
import base64
|
||||
|
||||
import ecdsa
|
||||
from ecdsa.util import sigdecode_der
|
||||
import pytest
|
||||
|
||||
try:
|
||||
import ecdsa
|
||||
from ecdsa.util import sigdecode_der
|
||||
except ImportError:
|
||||
ecdsa = None
|
||||
|
||||
try:
|
||||
import pyxmpp2_scram as scram
|
||||
@ -144,6 +149,7 @@ class SaslTestCase(
|
||||
m = self.negotiateCapabilities(["sasl"], False)
|
||||
self.assertEqual(m, Message({}, None, "CAP", ["END"]))
|
||||
|
||||
@pytest.mark.skipif(ecdsa is None, reason="python3-ecdsa is not available")
|
||||
@cases.OptionalityHelper.skipUnlessHasMechanism("ECDSA-NIST256P-CHALLENGE")
|
||||
def testEcdsa(self):
|
||||
"""Test ECDSA authentication."""
|
||||
|
Reference in New Issue
Block a user