Skip to content

Commit fa9c6df

Browse files
committed
Remove last vestiges of mock.mock
With the minimum Python version now being high enough to drop the usage of the external mock module, switch to unittest.mock everywhere.
1 parent 440465b commit fa9c6df

File tree

4 files changed

+4
-5
lines changed

4 files changed

+4
-5
lines changed

dev_requirements.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ build
22
build==1.2.2.post1 ; platform_python_implementation == "PyPy"
33
click==8.0.4
44
invoke==2.2.0
5-
mock
6-
mock==5.1.0 ; platform_python_implementation == "PyPy"
75
packaging>=20.4
86
packaging==24.2 ; platform_python_implementation == "PyPy"
97

tests/test_asyncio/test_credentials.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
from asyncio import Lock as AsyncLock
55
from asyncio import sleep as async_sleep
66
from typing import Optional, Tuple, Union
7+
from unittest.mock import Mock, call
78

89
import pytest
910
import pytest_asyncio
1011
import redis
11-
from mock.mock import Mock, call
1212
from redis import AuthenticationError, DataError, RedisError, ResponseError
1313
from redis.asyncio import Connection, ConnectionPool, Redis
1414
from redis.asyncio.retry import Retry

tests/test_asyncio/test_multidb/test_healthcheck.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
from unittest.mock import AsyncMock, Mock
2+
13
import pytest
2-
from mock.mock import AsyncMock, Mock
34

45
from redis.asyncio.multidb.database import Database
56
from redis.asyncio.multidb.healthcheck import (

tests/test_credentials.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
import threading
55
from time import sleep
66
from typing import Optional, Tuple, Union
7+
from unittest.mock import Mock, call
78

89
import pytest
910
import redis
10-
from mock.mock import Mock, call
1111
from redis import AuthenticationError, DataError, Redis, ResponseError
1212
from redis.auth.err import RequestTokenErr
1313
from redis.backoff import NoBackoff

0 commit comments

Comments
 (0)