def test_grpc(self, lnd: Lnd): assert not is_port_in_use(lnd.grpc_port)
def test_node(self, lnd: Lnd): assert not is_port_in_use(lnd.node_port)
def used_port(): port = 8000 while port <= 65535: if is_port_in_use(port): return port port += 1
def test_rest(self, lnd: Lnd): assert not is_port_in_use(lnd.rest_port)
def test_is_port_in_use(self, used_port): assert is_port_in_use(used_port)