def test_help_invalid(): command = make_command("help", "asdfasdf") capture = StringIO() with stdout_redirected(capture): command.run() assert "NOT FOUND" in capture.getvalue(), capture.getvalue()
def test_help(): command = make_command("help") capture = StringIO() with stdout_redirected(capture): command.run() assert "Run the specified aggregation" in capture.getvalue(), capture.getvalue()
def test_help_detail(): command = make_command("help", "logstream") capture = StringIO() with stdout_redirected(capture): command.run() assert "Run the specified aggregation" not in capture.getvalue(), capture.getvalue() assert "logstream <eventlog_uri> <plugin>:<port>" in capture.getvalue(), capture.getvalue() assert "Listens on a given port" in capture.getvalue(), capture.getvalue()