Ejemplo n.º 1
0
def test_run_error():
    import subprocess
    from gluuapi.utils import run

    with pytest.raises(SystemExit):
        run("random-command")

    with pytest.raises(subprocess.CalledProcessError):
        run("random-command", exit_on_error=False)
Ejemplo n.º 2
0
def test_run():
    from gluuapi.utils import run

    result = run("echo gluu")
    assert result.strip() == "gluu"