'Test for protocol negotiation
Very that NoHostAvailable is risen in Session.__init__ when there are no valid connections and that
no error is arisen otherwise, despite maybe being some invalid hosts
@since 3.9
@jira_ticket PYTHON-665
@expected_result NoHostAvailable when the driver is unable to connect to a valid host,
no exception otherwise
@test_category connection'

def test_session_host_parameter(self):

    cluster = Cluster(protocol_version=PROTOCOL_VERSION)
    with self.assertRaises(NoHostAvailable):
        Session(cluster, [])
    cluster.shutdown()
    cluster = Cluster(protocol_version=PROTOCOL_VERSION)
    with self.assertRaises(NoHostAvailable):
        Session(cluster, [Host('1.2.3.4', SimpleConvictionPolicy)])
    cluster.shutdown()
    cluster = Cluster(protocol_version=PROTOCOL_VERSION)
    Session(cluster, [Host(x, SimpleConvictionPolicy) for x in ('127.0.0.1', '127.0.0.2', '1.2.3.4')])
    cluster.shutdown()
