You've already forked httpie-cli
mirror of
https://github.com/httpie/cli.git
synced 2025-08-10 22:42:05 +02:00
Add --sorted
Also add --no-(sorted|unsorted) to allow the documented resetting to default via --no-<option>.
This commit is contained in:
@@ -298,6 +298,40 @@ class TestFormatOptions:
|
||||
],
|
||||
PARSED_DEFAULT_FORMAT_OPTIONS,
|
||||
),
|
||||
(
|
||||
[
|
||||
'--format-options=json.indent:2',
|
||||
'--unsorted',
|
||||
'--no-unsorted',
|
||||
],
|
||||
{
|
||||
'headers': {'sort': True},
|
||||
'json': {'sort_keys': True, 'indent': 2, 'format': True},
|
||||
}
|
||||
),
|
||||
(
|
||||
[
|
||||
'--format-options=json.indent:2',
|
||||
'--unsorted',
|
||||
'--sorted',
|
||||
],
|
||||
{
|
||||
'headers': {'sort': True},
|
||||
'json': {'sort_keys': True, 'indent': 2, 'format': True},
|
||||
}
|
||||
),
|
||||
(
|
||||
[
|
||||
'--format-options=json.indent:2',
|
||||
'--sorted',
|
||||
'--no-sorted',
|
||||
'--no-unsorted',
|
||||
],
|
||||
{
|
||||
'headers': {'sort': True},
|
||||
'json': {'sort_keys': True, 'indent': 2, 'format': True},
|
||||
}
|
||||
),
|
||||
],
|
||||
)
|
||||
def test_format_options_accumulation(self, args, expected_format_options):
|
||||
|
Reference in New Issue
Block a user