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 :
License : MIT License
Project Creator : rthorst

def test_bind_sockets_with_zero_port():
    ss, port = util.bind_sockets("", 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():