mirror of https://github.com/Yubico/python-fido2
Use unittest.mock instead of mock.
This commit is contained in:
parent
69ad253dc9
commit
221b822b12
|
@ -38,7 +38,6 @@ pcsc = ["pyscard"]
|
|||
|
||||
[tool.poetry.dev-dependencies]
|
||||
pytest = "^6.0"
|
||||
mock = "^4.0.3"
|
||||
|
||||
[build-system]
|
||||
requires = ["poetry-core>=1.0.0"]
|
||||
|
|
|
@ -27,9 +27,9 @@
|
|||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
import mock
|
||||
import unittest
|
||||
import json
|
||||
from unittest import mock
|
||||
from threading import Event, Timer
|
||||
from fido2 import cbor
|
||||
from fido2.utils import sha256, websafe_decode
|
||||
|
|
|
@ -25,9 +25,9 @@
|
|||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
from fido2.ctap1 import Ctap1, ApduError
|
||||
import unittest
|
||||
import mock
|
||||
from unittest import mock
|
||||
from fido2.ctap1 import Ctap1, ApduError
|
||||
|
||||
|
||||
class TestCtap1(unittest.TestCase):
|
||||
|
|
|
@ -25,6 +25,8 @@
|
|||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
import unittest
|
||||
from unittest import mock
|
||||
from fido2.ctap1 import RegistrationData
|
||||
from fido2.ctap2 import (
|
||||
Ctap2,
|
||||
|
@ -40,8 +42,6 @@ from fido2 import cbor
|
|||
from cryptography.hazmat.backends import default_backend
|
||||
from cryptography.hazmat.primitives.asymmetric import ec
|
||||
|
||||
import unittest
|
||||
import mock
|
||||
|
||||
_AAGUID = bytes.fromhex("F8A011F38C0A4D15800617111F9EDC7D")
|
||||
_INFO = bytes.fromhex(
|
||||
|
|
|
@ -26,8 +26,8 @@
|
|||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
import unittest
|
||||
import mock
|
||||
import sys
|
||||
from unittest import mock
|
||||
from fido2.hid import CTAPHID
|
||||
|
||||
sys.modules["smartcard"] = mock.Mock()
|
||||
|
|
Loading…
Reference in New Issue