kopia lustrzana https://github.com/Yakifo/amqtt
disabling rich output to verify usage message is generated correctly
rodzic
549e04fd57
commit
44dfd58972
|
@ -62,18 +62,21 @@ async def broker(config_file):
|
||||||
|
|
||||||
def test_cli_help_messages():
|
def test_cli_help_messages():
|
||||||
"""Test that help messages are displayed correctly."""
|
"""Test that help messages are displayed correctly."""
|
||||||
|
env = os.environ.copy()
|
||||||
|
env["NO_COLOR"] = '1'
|
||||||
|
|
||||||
amqtt_path = "amqtt"
|
amqtt_path = "amqtt"
|
||||||
output = subprocess.check_output([amqtt_path, "--help"])
|
output = subprocess.check_output([amqtt_path, "--help"], env=env)
|
||||||
assert "Usage: amqtt" in output.decode("utf-8")
|
assert "Usage: amqtt" in output.decode("utf-8")
|
||||||
|
|
||||||
|
|
||||||
amqtt_sub_path = "amqtt_sub"
|
amqtt_sub_path = "amqtt_sub"
|
||||||
output = subprocess.check_output([amqtt_sub_path, "--help"])
|
output = subprocess.check_output([amqtt_sub_path, "--help"], env=env)
|
||||||
assert "Usage: amqtt_sub" in output.decode("utf-8")
|
assert "Usage: amqtt_sub" in output.decode("utf-8")
|
||||||
|
|
||||||
|
|
||||||
amqtt_pub_path = "amqtt_pub"
|
amqtt_pub_path = "amqtt_pub"
|
||||||
output = subprocess.check_output([amqtt_pub_path, "--help"])
|
output = subprocess.check_output([amqtt_pub_path, "--help"], env=env)
|
||||||
assert "Usage: amqtt_pub" in output.decode("utf-8")
|
assert "Usage: amqtt_pub" in output.decode("utf-8")
|
||||||
|
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue