Exemplo n.º 1
0
def test_pretty_header(fake_results, capfd):
    """Ensure proper formatting in the header line of pretty_output."""

    _, options = formatting.prepare_results(fake_results)
    formatting.pretty_header(options)
    stdout, _ = capfd.readouterr()

    assert str("Server") in stdout
    assert str("Result") in stdout
Exemplo n.º 2
0
def test_pretty_header(fake_results, capfd):
    """Ensure proper formatting in the header line of pretty_output."""

    _, options = formatting.prepare_results(fake_results)
    formatting.pretty_header(options)
    stdout, _ = capfd.readouterr()

    assert str("Server") in stdout
    assert str("Result") in stdout
Exemplo n.º 3
0
def test_header_with_jumphost(fake_results, capfd):
    """The jumphost should appear in the header."""

    options = {"jump_host": "some_server"}
    _, options = formatting.prepare_results(fake_results, options)
    formatting.pretty_header(options)

    stdout, _ = capfd.readouterr()

    assert str("Server") in stdout
    assert str("Result") in stdout
    assert str("Jumpbox") in stdout
    assert str("some_server") in stdout
Exemplo n.º 4
0
def test_header_with_jumphost(fake_results, capfd):
    """The jumphost should appear in the header."""

    options = {"jump_host": "some_server"}
    _, options = formatting.prepare_results(fake_results, options)
    formatting.pretty_header(options)

    stdout, _ = capfd.readouterr()

    assert str("Server") in stdout
    assert str("Result") in stdout
    assert str("Jumpbox") in stdout
    assert str("some_server") in stdout