Skip to content

Commit

Permalink
Use stdlib AsyncMock when available (#1297)
Browse files Browse the repository at this point in the history
  • Loading branch information
mgorny authored Apr 11, 2024
1 parent 37874d1 commit 4346e49
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion test-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ anyio[trio] == 3.6.2

pytest-cov >= 2.8.1, < 2.11.0
pytest-mock >= 2.0.0
asyncmock >= 0.4.2
mock >= 4.0; python_version < "3.8"
pytest-xdist >= 1.31.0
pytest >= 6.0.0
coverage >= 4.5.3, < 5
Expand Down
7 changes: 6 additions & 1 deletion tests/test_http_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@
from unittest.mock import call
import pytest
import json
from mock import AsyncMock
import sys

if sys.version_info >= (3, 8):
from unittest.mock import AsyncMock
else:
from mock import AsyncMock

import stripe
from stripe import _http_client
Expand Down

0 comments on commit 4346e49

Please sign in to comment.