Skip to content

Commit 7c65a79

Browse files
committed
test(get-metadata): add test for filter without output-value (#170)
Add test case for using --filter without --output-value flag, which should display an error message.
1 parent cc3bb8b commit 7c65a79

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

tests/test_cli_get_metadata.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,3 +118,13 @@ def test_get_metadata_wrong_value():
118118
)
119119
assert test_result.exit_code == 2
120120
assert "Invalid value for --server" in test_result.output
121+
122+
123+
def test_get_metadata_filter_without_output_value():
124+
"""Test get-metadata --filter without --output-value."""
125+
test_get_metadata = CliRunner()
126+
test_result = test_get_metadata.invoke(
127+
get_metadata, ["--recid", 1, "--filter", "foo=bar"]
128+
)
129+
assert test_result.exit_code == 0
130+
assert "--filter can only be used with --output-value" in test_result.output

0 commit comments

Comments
 (0)