-
Notifications
You must be signed in to change notification settings - Fork 422
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
da31f89
commit 4181ece
Showing
6 changed files
with
32 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
from __future__ import absolute_import, division, print_function | ||
|
||
from stripe.api_resources.abstract import ListableAPIResource | ||
|
||
|
||
class TaxCode(ListableAPIResource): | ||
OBJECT_NAME = "tax_code" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
from __future__ import absolute_import, division, print_function | ||
|
||
import stripe | ||
|
||
|
||
TEST_RESOURCE_ID = "txcd_123" | ||
|
||
|
||
class TestTaxCode(object): | ||
def test_is_listable(self, request_mock): | ||
resources = stripe.TaxCode.list() | ||
request_mock.assert_requested("get", "/v1/tax_codes") | ||
assert isinstance(resources.data, list) | ||
assert isinstance(resources.data[0], stripe.TaxCode) | ||
|
||
def test_is_retrievable(self, request_mock): | ||
resource = stripe.TaxCode.retrieve(TEST_RESOURCE_ID) | ||
request_mock.assert_requested( | ||
"get", "/v1/tax_codes/%s" % TEST_RESOURCE_ID | ||
) | ||
assert isinstance(resource, stripe.TaxCode) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters