Skip to content

Commit

Permalink
Remove last uses of mock
Browse files Browse the repository at this point in the history
The node tests still relied on the external mock library for mocking,
whereas other tests have transitioned to unittest.mock. Since we support
Python 3.7 and greater, we can remove that requirement and pull them in
line too.
  • Loading branch information
s-t-e-v-e-n-k committed May 20, 2024
1 parent cbe7242 commit 20d207e
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@
"pytest-asyncio",
"pytest-httpserver",
"trustme",
"mock",
"requests",
"aiohttp",
"httpx",
Expand Down
2 changes: 1 addition & 1 deletion tests/node/test_http_requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
import gzip
import ssl
import warnings
from unittest.mock import Mock, patch

import pytest
import requests
from mock import Mock, patch
from requests.auth import HTTPBasicAuth

from elastic_transport import NodeConfig, RequestsHttpNode
Expand Down
2 changes: 1 addition & 1 deletion tests/node/test_http_urllib3.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
import re
import ssl
import warnings
from unittest.mock import Mock, patch

import pytest
import urllib3
from mock import Mock, patch
from urllib3.response import HTTPHeaderDict

from elastic_transport import NodeConfig, TransportError, Urllib3HttpNode
Expand Down

0 comments on commit 20d207e

Please sign in to comment.