Skip to content

Use public endpoint in stripe mock #1505

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 2 commits into from
Apr 30, 2025
Merged
Changes from all commits
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
6 changes: 3 additions & 3 deletions tests/api_resources/test_list_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,15 @@ def test_create(self, http_client_mock, list_object):
assert res.foo == "bar"
assert res.stripe_account == "acct_123"

def test_create_maintains_list_properties(
def test_retrieve_maintains_list_properties(
self, http_client_mock, list_object
):
# Testing with real requests because our mock makes it impossible to
# test otherwise
charge = stripe.Charge.retrieve("ch_123", api_key="sk_test_custom")
res = charge.refunds.create(amount=123)
res = charge.refunds.retrieve("re_abc")
http_client_mock.assert_requested(
"post", path="/v1/charges/ch_123/refunds", post_data="amount=123"
"get", path="/v1/charges/ch_123/refunds/re_abc"
)
assert res.api_key == "sk_test_custom"

Expand Down