bokeh.server.util.bind_sockets

Here are the examples of the python api bokeh.server.util.bind_sockets taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

1 Examples 7

3 View Source File : test_util.py
License : MIT License
Project Creator : rthorst

def test_bind_sockets_with_zero_port():
    ss, port = util.bind_sockets("127.0.0.1", 0)
    assert isinstance(ss, list)
    assert len(ss) == 1
    assert isinstance(ss[0], socket.socket)
    assert isinstance(port, int)

def test_check_whitelist_rejects_port_mismatch():