diff --git a/.travis.yml b/.travis.yml index 37868b3db..7d6d2bd07 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,7 +26,7 @@ cache: env: global: # If changing this number, please also change it in `tests/conftest.py`. - - STRIPE_MOCK_VERSION=0.95.0 + - STRIPE_MOCK_VERSION=0.98.0 before_install: # Unpack and start stripe-mock so that the test suite can talk to it diff --git a/tests/api_resources/issuing/test_dispute.py b/tests/api_resources/issuing/test_dispute.py index fb0a459d8..54e986080 100644 --- a/tests/api_resources/issuing/test_dispute.py +++ b/tests/api_resources/issuing/test_dispute.py @@ -8,7 +8,7 @@ class TestDispute(object): def test_is_creatable(self, request_mock): - resource = stripe.issuing.Dispute.create() + resource = stripe.issuing.Dispute.create(transaction="ipi_123") request_mock.assert_requested("post", "/v1/issuing/disputes") assert isinstance(resource, stripe.issuing.Dispute) @@ -31,3 +31,10 @@ def test_is_retrievable(self, request_mock): "get", "/v1/issuing/disputes/%s" % TEST_RESOURCE_ID ) assert isinstance(resource, stripe.issuing.Dispute) + + def test_is_submittable(self, request_mock): + resource = stripe.issuing.Dispute.submit(TEST_RESOURCE_ID) + request_mock.assert_requested( + "post", "/v1/issuing/disputes/%s/submit" % TEST_RESOURCE_ID + ) + assert isinstance(resource, stripe.issuing.Dispute) diff --git a/tests/api_resources/test_list_object.py b/tests/api_resources/test_list_object.py index ce5e1bb87..a6cfe489c 100644 --- a/tests/api_resources/test_list_object.py +++ b/tests/api_resources/test_list_object.py @@ -49,17 +49,10 @@ def test_create(self, request_mock, list_object): def test_create_maintains_list_properties(self, request_mock, list_object): # Testing with real requests because our mock makes it impossible to # test otherwise - customer = stripe.Customer.retrieve( - "cus_123", api_key="sk_test_custom" - ) - - res = customer.sources.create(source="tok_123") - + charge = stripe.Charge.retrieve("ch_123", api_key="sk_test_custom") + res = charge.refunds.create(amount=123) request_mock.assert_requested( - "post", - "/v1/customers/cus_123/sources", - {"source": "tok_123"}, - None, + "post", "/v1/charges/ch_123/refunds", {"amount": 123}, None, ) assert res.api_key == "sk_test_custom" diff --git a/tests/conftest.py b/tests/conftest.py index a91925f49..7829f45ff 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -16,7 +16,7 @@ # When changing this number, don't forget to change it in `.travis.yml` too. -MOCK_MINIMUM_VERSION = "0.95.0" +MOCK_MINIMUM_VERSION = "0.98.0" # Starts stripe-mock if an OpenAPI spec override is found in `openapi/`, and # otherwise fall back to `STRIPE_MOCK_PORT` or 12111.