Update test to expect a trailing newline in ctf flag -p output
This commit is contained in:
@@ -110,13 +110,14 @@ def test_flag_cmd_cli():
|
|||||||
assert result_std.exit_code == 0
|
assert result_std.exit_code == 0
|
||||||
assert "Last detected flag: flag{test_cli_flag}" in result_std.output
|
assert "Last detected flag: flag{test_cli_flag}" in result_std.output
|
||||||
|
|
||||||
# Test plain flag command output (no flavor text, no newline)
|
# Test plain flag command output (no flavor text, has newline)
|
||||||
result_plain = runner.invoke(cli, ["flag", "--plain"])
|
result_plain = runner.invoke(cli, ["flag", "--plain"])
|
||||||
assert result_plain.exit_code == 0
|
assert result_plain.exit_code == 0
|
||||||
assert result_plain.output == "flag{test_cli_flag}"
|
assert result_plain.output.strip() == "flag{test_cli_flag}"
|
||||||
finally:
|
finally:
|
||||||
write_config(original_config, str(config_file))
|
write_config(original_config, str(config_file))
|
||||||
|
|
||||||
|
|
||||||
def test_flag_cmd_exemption(capsys):
|
def test_flag_cmd_exemption(capsys):
|
||||||
"""
|
"""
|
||||||
Verifies that running ctf flag is exempted from triggering the stdout flag warning box.
|
Verifies that running ctf flag is exempted from triggering the stdout flag warning box.
|
||||||
|
|||||||
Reference in New Issue
Block a user