10000 Beta: add AIOHTTP http client by richardm-stripe · Pull Request #1254 · stripe/stripe-python · GitHub
[go: up one dir, main page]

Skip to content

Beta: add AIOHTTP http client #1254

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Feb 27, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Format
  • Loading branch information
richardm-stripe committed Feb 27, 2024
commit 7e424c889bff3f8e60f0f72e4459b3e4990af015
6 changes: 4 additions & 2 deletions tests/test_http_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1534,11 +1534,13 @@ class TestAIOHTTPClient(StripeClientTestCase, ClientTestBase):
@pytest.fixture
def mock_response(self, mocker, request_mock):
def mock_response(mock, body={}, code=200):

class Content:
def __aiter__(self):
async def chunk():
yield bytes(body, "utf-8") if isinstance(body, str) else body
yield bytes(body, "utf-8") if isinstance(
body, str
) else body

return chunk()

async def read(self):
Expand Down
0