def setUp(self): if is_monkey_patched(): raise unittest.SkipTest("Can't test libev with monkey patching") if LibevConnection is None: raise unittest.SkipTest( 'libev does not appear to be installed correctly') LibevConnection.initialize_reactor()
def make_connection(self): c = LibevConnection('1.2.3.4', cql_version='3.0.1') c._socket = Mock() c._socket.send.side_effect = lambda x: len(x) return c
def setUp(self): if LibevConnection is None: raise unittest.SkipTest( 'libev does not appear to be installed correctly') LibevConnection.initialize_reactor()