Exemplo n.º 1
0
def test_already_active(no_rpc):
    with pytest.raises(SystemError):
        rpc.launch("ganache-cli")
Exemplo n.º 2
0
def test_launch_file_not_found(no_rpc):
    with pytest.raises(FileNotFoundError):
        rpc.launch("not-ganache")
Exemplo n.º 3
0
def test_launch(no_rpc):
    assert not rpc.is_active()
    assert not rpc.is_child()
    rpc.launch("ganache-cli")
    assert rpc.is_active()
    assert rpc.is_child()
Exemplo n.º 4
0
def test_launch_process_fails(no_rpc):
    with pytest.raises(RPCProcessError):
        rpc.launch("ganache-cli --help")
Exemplo n.º 5
0
def test_already_active(no_rpc):
    rpc.launch("ganache-cli -a 20")
    with pytest.raises(SystemError):
        rpc.attach("http://127.0.0.1:31337")
Exemplo n.º 6
0
def test_launch_process_fails(no_rpc):
    proc = rpc._rpc
    rpc._rpc = None
    with pytest.raises(RPCProcessError):
        rpc.launch("ganache-cli")
    rpc._rpc = proc
Exemplo n.º 7
0
def test_launch_cant_connect(no_rpc):
    with pytest.raises(RPCConnectionError):
        rpc.launch("ganache-cli --help")