'get_available_port() should return an open port within the range'

@pytest.mark.parametrize('port_min,port_max', ((random.randint(1024, 1500), random.randint(1800, 2048)) for _ in range(50)))
def test_returns_an_open_port(self, port_min, port_max):

    port = common.get_available_port(port_min, port_max)
    assert (port_min <= port <= port_max)
    with socket.socket() as tmpsock:
        tmpsock.bind(('127.0.0.1', port))
