Skip to content

Commit 34930ea

Browse files
Add more exports tests (#1140)
1 parent c3399c9 commit 34930ea

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

tests/test_exports.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,33 @@ def test_can_import_webhook_members() -> None:
2222
assert WebhookSignature is not None
2323

2424

25+
def test_can_import_list_search_objects() -> None:
26+
from stripe.api_resources import (
27+
ListObject as ListObjectFromApiResources,
28+
SearchResultObject as SearchObjectFromApiResources,
29+
)
30+
from stripe.stripe_object import (
31+
StripeObject,
32+
)
33+
34+
assert (
35+
ListObjectFromApiResources[StripeObject]
36+
== stripe.ListObject[StripeObject]
37+
)
38+
assert (
39+
SearchObjectFromApiResources[StripeObject]
40+
== stripe.SearchResultObject[StripeObject]
41+
)
42+
43+
44+
def test_can_import_misc_resources() -> None:
45+
from stripe.api_resources import ErrorObject, OAuthErrorObject, FileUpload
46+
47+
assert ErrorObject is stripe.ErrorObject
48+
assert OAuthErrorObject is stripe.OAuthErrorObject
49+
assert FileUpload is stripe.FileUpload
50+
51+
2552
def test_can_import_abstract() -> None:
2653
from stripe.api_resources.abstract import (
2754
APIResource as APIResourceFromApiResourcesAbstract,

0 commit comments

Comments
 (0)