예제 #1
0
 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()
예제 #2
0
 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()