Skip to content

Commit

Permalink
Enable streaming tests in python (#996)
Browse files Browse the repository at this point in the history
  • Loading branch information
pakrym-stripe authored Jul 24, 2023
1 parent 2721895 commit 99180bd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,18 +76,21 @@ def pytest_runtest_setup(item):
def setup_stripe():
orig_attrs = {
"api_base": stripe.api_base,
"upload_api_base": stripe.upload_api_base,
"api_key": stripe.api_key,
"client_id": stripe.client_id,
"default_http_client": stripe.default_http_client,
}
http_client = stripe.http_client.new_default_http_client()
stripe.api_base = "http://localhost:%s" % MOCK_PORT
stripe.upload_api_base = "http://localhost:%s" % MOCK_PORT
stripe.api_key = "sk_test_123"
stripe.client_id = "ca_123"
stripe.default_http_client = http_client
yield
http_client.close()
stripe.api_base = orig_attrs["api_base"]
stripe.upload_api_base = orig_attrs["upload_api_base"]
stripe.api_key = orig_attrs["api_key"]
stripe.client_id = orig_attrs["client_id"]
stripe.default_http_client = orig_attrs["default_http_client"]
Expand Down

0 comments on commit 99180bd

Please sign in to comment.