diff --git a/cqlengine/connection.py b/cqlengine/connection.py index 9983aeac..90a54a97 100644 --- a/cqlengine/connection.py +++ b/cqlengine/connection.py @@ -85,34 +85,7 @@ def setup( cluster = Cluster(hosts) session = cluster.connect() session.row_factory = dict_factory - return - _max_connections = max_connections - - if default_keyspace: - from cqlengine import models - models.DEFAULT_KEYSPACE = default_keyspace - - _hosts = [] - for host in hosts: - host = host.strip() - host = host.split(':') - if len(host) == 1: - port = 9160 - elif len(host) == 2: - try: - port = int(host[1]) - except ValueError: - raise CQLConnectionError("Can't parse port as int {}".format(':'.join(host))) - else: - raise CQLConnectionError("Can't parse host string {}".format(':'.join(host))) - - _hosts.append(Host(host[0], port)) - - if not _hosts: - raise CQLConnectionError("At least one host required") - - connection_pool = ConnectionPool(_hosts, username, password, consistency, timeout) class ConnectionPool(object): diff --git a/cqlengine/tests/test_batch_query.py b/cqlengine/tests/test_batch_query.py index 7066643d..9c2d4140 100644 --- a/cqlengine/tests/test_batch_query.py +++ b/cqlengine/tests/test_batch_query.py @@ -1,7 +1,6 @@ from unittest import skip from uuid import uuid4 import random -from cqlengine.connection import ConnectionPool import mock import sure