adding protocol version as option in tests. need to get 1.2 working properly
This commit is contained in:
@@ -9,7 +9,9 @@ if os.environ.get('CASSANDRA_TEST_HOST'):
|
|||||||
else:
|
else:
|
||||||
CASSANDRA_TEST_HOST = 'localhost'
|
CASSANDRA_TEST_HOST = 'localhost'
|
||||||
|
|
||||||
connection.setup([CASSANDRA_TEST_HOST], default_keyspace='cqlengine_test')
|
protocol_version = int(os.environ.get("CASSANDRA_PROTOCOL_VERSION", 2))
|
||||||
|
|
||||||
|
connection.setup([CASSANDRA_TEST_HOST], protocol_version=protocol_version, default_keyspace='cqlengine_test')
|
||||||
|
|
||||||
class BaseCassEngTestCase(TestCase):
|
class BaseCassEngTestCase(TestCase):
|
||||||
|
|
||||||
|
@@ -56,6 +56,9 @@ Getting Started
|
|||||||
# the list of hosts will be passed to create a Cluster() instance
|
# the list of hosts will be passed to create a Cluster() instance
|
||||||
>>> connection.setup(['127.0.0.1'])
|
>>> connection.setup(['127.0.0.1'])
|
||||||
|
|
||||||
|
# if you're connecting to a 1.2 cluster
|
||||||
|
>>> connection.setup(['127.0.0.1'], protocol_version=1)
|
||||||
|
|
||||||
#...and create your CQL table
|
#...and create your CQL table
|
||||||
>>> from cqlengine.management import sync_table
|
>>> from cqlengine.management import sync_table
|
||||||
>>> sync_table(ExampleModel)
|
>>> sync_table(ExampleModel)
|
||||||
|
Reference in New Issue
Block a user