test(cli): assert missing owner side effect
This commit is contained in:
@@ -438,12 +438,10 @@ 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 == 2
|
assert result.exit_code == 2
|
||||||
assert "Missing option '--user'" in result.output
|
assert repo._portfolios == []
|
||||||
|
|
||||||
|
|
||||||
def test_create_with_unknown_user_fails() -> None:
|
def test_create_with_unknown_user_fails() -> None:
|
||||||
|
|||||||
Reference in New Issue
Block a user