Пример #1
0
def test_choose_port_returns_an_open_port():
    "choose_port() returns an open port"
    app = OnionShare()
    # choose a new port
    app.choose_port()
    socket.socket().bind(("127.0.0.1", app.port))
Пример #2
0
def test_choose_port_returns_an_open_port():
    """choose_port() returns an open port"""
    app = OnionShare()
    # choose a new port
    app.choose_port()
    socket.socket().bind(("127.0.0.1", app.port))
Пример #3
0
def test_choose_port_returns_a_port_number():
    "choose_port() returns a port number"
    app = OnionShare()
    app.choose_port()
    assert 1024 <= app.port <= 65535
Пример #4
0
def test_choose_port_returns_a_port_number():
    """choose_port() returns a port number"""
    app = OnionShare()
    app.choose_port()
    assert 1024 <= app.port <= 65535