コード例 #1
0
ファイル: test_commands.py プロジェクト: joeywen/zarkov
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()
コード例 #2
0
ファイル: test_commands.py プロジェクト: joeywen/zarkov
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()
コード例 #3
0
ファイル: test_commands.py プロジェクト: joeywen/zarkov
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()