mirror of
https://gitlab.com/KKlochko/tui-rsync.git
synced 2026-08-12 17:57:43 +00:00
Update to step to test the result of CLI execution.
This commit is contained in:
@@ -13,14 +13,13 @@ def when_run_cli(context):
|
||||
context.cli_result = context.cli_runner.invoke(context.cli_app, context.arguments)
|
||||
|
||||
|
||||
@then('the CLI executed successfully')
|
||||
def then_cli_executed_successfully(context):
|
||||
assert context.cli_result.exit_code == 0
|
||||
|
||||
|
||||
@then('the CLI executed with an error')
|
||||
def then_cli_executed_with_error(context):
|
||||
assert context.cli_result.exit_code == 0
|
||||
@then('the CLI executed with "{result}"')
|
||||
def then_cli_executed_successfully(context, result):
|
||||
match result:
|
||||
case "success":
|
||||
assert context.cli_result.exit_code == 0
|
||||
case "error":
|
||||
assert context.cli_result.exit_code == 0
|
||||
|
||||
|
||||
@then('the CLI output contains "{string}"')
|
||||
|
||||
Reference in New Issue
Block a user