Skip to content

Commit

Permalink
Add corporate purchase page method
Browse files Browse the repository at this point in the history
  • Loading branch information
leoKagohara-Stark committed Jun 4, 2024
1 parent 4318460 commit 37880f0
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ Given a version number MAJOR.MINOR.PATCH, increment:


## [Unreleased]
### Fixed
- CorporatePurchase page method

## [2.25.1] - 2024-04-01
### Fixed
Expand Down
2 changes: 1 addition & 1 deletion starkbank/corporatepurchase/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from . import log
from .log.__log import Log
from .__corporatepurchase import query, get, parse, response
from .__corporatepurchase import query, get, page, parse, response
16 changes: 16 additions & 0 deletions tests/sdk/test_corporate_purchase.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,22 @@
starkbank.user = exampleProject


class TestCorporatePurchasePage(TestCase):

def test_success(self):
cursor = None
ids = []
for _ in range(2):
purchases, cursor = starkbank.corporatepurchase.page(limit=2, cursor=cursor)
for purchase in purchases:
print(purchase)
self.assertFalse(purchase.id in ids)
ids.append(purchase.id)
if cursor is None:
break
self.assertTrue(len(ids) == 4)


class TestCorporatePurchaseQuery(TestCase):

def test_success(self):
Expand Down

0 comments on commit 37880f0

Please sign in to comment.