test(cli): stabilize required option assertion
This commit is contained in:
@@ -438,10 +438,12 @@ def test_create_without_user_fails() -> None:
|
|||||||
result = runner.invoke(
|
result = runner.invoke(
|
||||||
runner.app,
|
runner.app,
|
||||||
["portfolio", "create", "MY_PORT", "--asset-id", _TEST_ASSET_ID, "--strategy-id", "set-1", "--force"],
|
["portfolio", "create", "MY_PORT", "--asset-id", _TEST_ASSET_ID, "--strategy-id", "set-1", "--force"],
|
||||||
|
color=False,
|
||||||
|
terminal_width=200,
|
||||||
)
|
)
|
||||||
|
|
||||||
assert result.exit_code != 0
|
assert result.exit_code == 2
|
||||||
assert "--user" in result.output
|
assert "Missing option '--user'" in result.output
|
||||||
|
|
||||||
|
|
||||||
def test_create_with_unknown_user_fails() -> None:
|
def test_create_with_unknown_user_fails() -> None:
|
||||||
|
|||||||
Reference in New Issue
Block a user