tests/api_resources/billing_portal/test_session.py
raw| 1 | import stripe |
| 2 | |
| 3 | |
| 4 | TEST_RESOURCE_ID = "pts_123" |
| 5 | |
| 6 | |
| 7 | class TestSession(object): |
| 8 | def test_is_creatable(self, http_client_mock): |
| 9 | resource = stripe.billing_portal.Session.create( |
| 10 | customer="cus_123", return_url="https://stripe.com/return" |
| 11 | ) |
| 12 | http_client_mock.assert_requested( |
| 13 | "post", |
| 14 | path="/v1/billing_portal/sessions", |
| 15 | post_data="customer=cus_123&return_url=https://stripe.com/return", |
| 16 | ) |
| 17 | assert isinstance(resource, stripe.billing_portal.Session) |