Use mock from Python stdlib and upgrade test requirements versions

mock is part of the Python standard lib since Python 3.3, see also
https://docs.python.org/3/library/unittest.mock.html. Switching to that
allows to remove it from `test/requirements.txt`.

While at it, also updating the package versions in `test/requirements.txt`.
This commit is contained in:
Daniel Bast
2023-09-16 09:28:22 +02:00
parent a109c80c92
commit 44498d8865
6 changed files with 7 additions and 8 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
import sys
from dataclasses import dataclass
from mock import MagicMock, Mock, patch
from unittest.mock import MagicMock, Mock, patch
from typing import Callable
# Prevent importing modules w/Raspi hardware dependencies.
+2 -3
View File
@@ -1,4 +1,3 @@
coverage==7.2.1
mock==4.0.3
pytest==6.2.4
coverage==7.3.1
pytest==7.4.2
pytest-cov==4.1.0
+1 -1
View File
@@ -2,7 +2,7 @@ import embit
import os
import sys
import time
from mock import Mock, patch, MagicMock
from unittest.mock import Mock, patch, MagicMock
from seedsigner.helpers import embit_utils
from seedsigner.models.settings import Settings
+1 -1
View File
@@ -1,5 +1,5 @@
import pytest
from mock import MagicMock
from unittest.mock import MagicMock
from seedsigner.models.seed import Seed
from embit import bip39
+1 -1
View File
@@ -1,7 +1,7 @@
import os
from typing import Callable
from mock import PropertyMock, patch
from unittest.mock import PropertyMock, patch
# Must import test base before the Controller
from base import FlowTest, FlowStep
+1 -1
View File
@@ -1,4 +1,4 @@
from mock import patch
from unittest.mock import patch
# Must import test base before the Controller
from base import FlowTest, FlowStep