Skip to content

Commit 5866451

Browse files
fix: Resolve help page error for list commands with non-standard names (#588)
1 parent f106959 commit 5866451

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

linodecli/help_pages.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ def print_help_action(
159159

160160
console.print()
161161

162-
if op.method == "get" and op.action == "list":
162+
if op.method == "get" and op.response_model.is_paginated:
163163
_help_action_print_filter_args(console, op)
164164
return
165165

tests/integration/domains/test_domain_records.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,3 +195,21 @@ def test_delete_a_domain_record(test_domain_and_record):
195195

196196
# Assert on status code returned from deleting domain
197197
assert process.returncode == SUCCESS_STATUS_CODE
198+
199+
200+
def test_help_records_list(test_domain_and_record):
201+
process = exec_test_command(
202+
BASE_CMD
203+
+ [
204+
"records-list",
205+
"--help",
206+
]
207+
)
208+
output = process.stdout.decode()
209+
210+
assert "Domain Records List" in output
211+
assert "You may filter results with:" in output
212+
assert "--type" in output
213+
assert "--name" in output
214+
assert "--target" in output
215+
assert "--tag" in output

0 commit comments

Comments
 (0)