'Test to validate that we cannot connect with invalid client auth.
This test will use bad keys/certs to preform client authentication. It will then attempt to connect
to a server that has client authentication enabled.
@since 2.7.0
@expected_result The client will throw an exception on connect
@test_category connection:ssl'

def test_cannot_connect_with_bad_client_auth(self):

    abs_path_ca_cert_path = os.path.abspath(CLIENT_CA_CERTS)
    abs_driver_keyfile = os.path.abspath(DRIVER_KEYFILE)
    abs_driver_certfile = os.path.abspath(DRIVER_CERTFILE_BAD)
    cluster = Cluster(protocol_version=PROTOCOL_VERSION, ssl_options={'ca_certs': abs_path_ca_cert_path, 'ssl_version': ssl.PROTOCOL_TLSv1, 'keyfile': abs_driver_keyfile, 'certfile': abs_driver_certfile})
    with self.assertRaises(NoHostAvailable) as context:
        cluster.connect()
    cluster.shutdown()
