Esempio n. 1
0
def test_bind_socket_fail(zmq_context):
    socket = zmq_context.socket(zmq.PUB)
    with pytest.raises(zmq.ZMQError):
        bind_socket(socket, "bad-address", '--publish')
    socket.close()
Esempio n. 2
0
def test_bind_socket_success(zmq_context):
    socket = zmq_context.socket(zmq.PUB)
    address = "ipc:///tmp/pelita-test-bind-socket-%s" % uuid.uuid4()
    bind_socket(socket, address)