Skip to content

Commit 468d060

Browse files
committed
Add some Data CLI TODOs and make a typing fix
1 parent 7eea0ef commit 468d060

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

planet/clients/orders.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,9 @@ async def wait(self,
404404

405405
return current_state
406406

407-
async def list_orders(self, state: str = None, limit: int = 100):
407+
async def list_orders(self,
408+
state: str = None,
409+
limit: typing.Union[int, None] = 100):
408410
"""Get all order requests.
409411
410412
Parameters:

tests/integration/test_orders_cli.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ def test_cli_orders_list_pretty(invoke, monkeypatch, order_description):
159159
mock_echo_json.assert_called_once_with([order_description], True)
160160

161161

162+
# TODO: add tests for "get --pretty" (gh-491).
162163
@respx.mock
163164
def test_cli_orders_get(invoke, oid, order_description):
164165
get_url = f'{TEST_ORDERS_URL}/{oid}'
@@ -182,6 +183,7 @@ def test_cli_orders_get_id_not_found(invoke, oid):
182183
assert 'Error: {"message": "Error message"}\n' == result.output
183184

184185

186+
# TODO: add tests for "cancel --pretty" (gh-491).
185187
@respx.mock
186188
def test_cli_orders_cancel(invoke, oid, order_description):
187189
cancel_url = f'{TEST_ORDERS_URL}/{oid}'
@@ -206,6 +208,7 @@ def test_cli_orders_cancel_id_not_found(invoke, oid):
206208
assert 'Error: {"message": "Error message"}\n' == result.output
207209

208210

211+
# TODO: add tests for "wait --state" (gh-492) and "wait --pretty" (gh-491).
209212
@respx.mock
210213
def test_cli_orders_wait_default(invoke, order_description, oid):
211214
get_url = f'{TEST_ORDERS_URL}/{oid}'
@@ -286,6 +289,7 @@ def _func():
286289
return _func
287290

288291

292+
# TODO: add test for --checksum (see gh-432).
289293
@respx.mock
290294
def test_cli_orders_download_default(invoke, mock_download_response, oid):
291295
mock_download_response()
@@ -362,6 +366,8 @@ def test_cli_orders_download_state(invoke, order_description, oid):
362366
assert 'order state (running) is not a final state.' in result.output
363367

364368

369+
# TODO: convert "create" tests to "request" tests (gh-366).
370+
# TODO: add tests of "create --pretty" (gh-491).
365371
@pytest.mark.parametrize(
366372
"id_string, expected_ids",
367373
[('4500474_2133707_2021-05-20_2419', ['4500474_2133707_2021-05-20_2419']),

0 commit comments

Comments
 (0)