def module_rpc_server(): from testrpc.__main__ import create_server from testrpc.testrpc import evm_reset server = create_server('127.0.0.1', 8545) evm_reset() thread = threading.Thread(target=server.serve_forever) thread.daemon = True thread.start() yield server server.shutdown() server.server_close()
def rpc_server(): from testrpc.__main__ import create_server from testrpc.testrpc import evm_reset server = create_server('127.0.0.1', 8545) evm_reset() thread = threading.Thread(target=server.serve_forever) thread.daemon = True thread.start() yield server server.shutdown() server.server_close()
def testrpc_server(request, populus_config): from testrpc.__main__ import create_server from testrpc.testrpc import evm_reset rpc_port = populus_config.get_value(request, 'rpc_server_port') rpc_host = populus_config.get_value(request, 'rpc_server_host') server = create_server(rpc_host, rpc_port) evm_reset() thread = threading.Thread(target=server.serve_forever) thread.daemon = True thread.start() yield server server.shutdown() server.server_close()