Update unit tests for skipping OPTIONS message
This commit is contained in:
@@ -21,7 +21,7 @@ from cassandra.marshal import uint8_pack, uint32_pack
|
|||||||
from cassandra.io.asyncorereactor import AsyncoreConnection
|
from cassandra.io.asyncorereactor import AsyncoreConnection
|
||||||
|
|
||||||
|
|
||||||
class LibevConnectionTest(unittest.TestCase):
|
class AsyncoreConnectionTest(unittest.TestCase):
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def setUpClass(cls):
|
def setUpClass(cls):
|
||||||
@@ -35,7 +35,7 @@ class LibevConnectionTest(unittest.TestCase):
|
|||||||
cls.socket_patcher.stop()
|
cls.socket_patcher.stop()
|
||||||
|
|
||||||
def make_connection(self):
|
def make_connection(self):
|
||||||
c = AsyncoreConnection('1.2.3.4')
|
c = AsyncoreConnection('1.2.3.4', cql_version='3.0.1')
|
||||||
c.socket = Mock()
|
c.socket = Mock()
|
||||||
c.socket.send.side_effect = lambda x: len(x)
|
c.socket.send.side_effect = lambda x: len(x)
|
||||||
return c
|
return c
|
||||||
|
@@ -35,7 +35,7 @@ class LibevConnectionTest(unittest.TestCase):
|
|||||||
raise unittest.SkipTest('libev does not appear to be installed correctly')
|
raise unittest.SkipTest('libev does not appear to be installed correctly')
|
||||||
|
|
||||||
def make_connection(self):
|
def make_connection(self):
|
||||||
c = LibevConnection('1.2.3.4')
|
c = LibevConnection('1.2.3.4', cql_version='3.0.1')
|
||||||
c._socket = Mock()
|
c._socket = Mock()
|
||||||
c._socket.send.side_effect = lambda x: len(x)
|
c._socket.send.side_effect = lambda x: len(x)
|
||||||
return c
|
return c
|
||||||
|
Reference in New Issue
Block a user