Ejemplo n.º 1
0
 def query_callback(response, error):
     logging.info(response)
     assert isinstance(response, dict)
     assert response['_id'] == TEST_TIMESTAMP
     assert response['test_count'] == 5
     test_shunt.register_called('retrieved')
     tornado.ioloop.IOLoop.instance().stop()
Ejemplo n.º 2
0
 def pool_callback2(response, error):
     assert len(response) == 1
     test_shunt.register_called('pool2')
     
     if test_shunt.is_called('pool1'):
         # don't expect 2 finishes second
         tornado.ioloop.IOLoop.instance().stop()
Ejemplo n.º 3
0
 def query_again_callback(response, error):
     tornado.ioloop.IOLoop.instance().stop()
     logging.info(response)
     logging.info(error)
     assert error is None
     assert isinstance(response, dict)
     assert response['_id'] == TEST_TIMESTAMP
     assert response['test_count'] == 1
     test_shunt.register_called('retrieved_again')
Ejemplo n.º 4
0
 def query_callback(response, error):
     tornado.ioloop.IOLoop.instance().stop()
     logging.info(response)
     logging.info(error)
     assert error is None
     assert isinstance(response, dict)
     assert response['_id'] == TEST_TIMESTAMP
     assert response['test_count'] == 1
     test_shunt.register_called('retrieved')
Ejemplo n.º 5
0
 def pool_callback(response, error):
     assert len(response) == 1
     test_shunt.register_called('pool1')
     if test_shunt.is_called('pool2'):
         tornado.ioloop.IOLoop.instance().stop()
Ejemplo n.º 6
0
 def update_callback(response, error):
     logging.info(response)
     assert len(response) == 1
     test_shunt.register_called('update')
     tornado.ioloop.IOLoop.instance().stop()
Ejemplo n.º 7
0
 def update_callback(response, error):
     logging.info("UPDATE:")
     tornado.ioloop.IOLoop.instance().stop()
     logging.info(response)
     assert len(response) == 1
     test_shunt.register_called('update')
Ejemplo n.º 8
0
 def query_callback(response, error):
     logging.info(response)
     assert len(response) == 1
     test_shunt.register_called('retrieved')
     tornado.ioloop.IOLoop.instance().stop()
Ejemplo n.º 9
0
 def pool_callback(response, error):
     assert len(response) == 1
     test_shunt.register_called('pool1')
     if test_shunt.is_called('pool2'):
         tornado.ioloop.IOLoop.instance().stop()
Ejemplo n.º 10
0
 def insert_callback(response, error):
     tornado.ioloop.IOLoop.instance().stop()
     logging.info(response)
     assert len(response) == 1
     test_shunt.register_called('inserted')
Ejemplo n.º 11
0
 def pool_callback2(response, error):
     if test_shunt.is_called('pool1'):
         # don't expect 2 finishes second
         tornado.ioloop.IOLoop.instance().stop()
     assert len(response) == 1
     test_shunt.register_called('pool2')
Ejemplo n.º 12
0
 def query_callback(response, error):
     tornado.ioloop.IOLoop.instance().stop()
     logging.info(response)
     assert len(response) == 1
     test_shunt.register_called('retrieved')
Ejemplo n.º 13
0
 def delete_callback(response, error):
     logging.info(response)
     assert len(response) == 1
     test_shunt.register_called('deleted')
     tornado.ioloop.IOLoop.instance().stop()
Ejemplo n.º 14
0
 def callback(response, error):
     assert len(response) == 1
     test_shunt.register_called("got_record")
     tornado.ioloop.IOLoop.instance().stop()
Ejemplo n.º 15
0
 def update_callback(response, error):
     tornado.ioloop.IOLoop.instance().stop()
     logging.info(response)
     logging.info(error)
     assert isinstance(error, asyncmongo.RSConnectionError)
     test_shunt.register_called('update_f')
Ejemplo n.º 16
0
 def find_callback(response, error):
     logging.info('find: %s', response)
     # assert len(response) == 1
     test_shunt.register_called('find')        
     tornado.ioloop.IOLoop.instance().stop()
Ejemplo n.º 17
0
 def duplicate_callback(response, error):
     logging.info(response)
     if error:
         test_shunt.register_called("dupe")
     tornado.ioloop.IOLoop.instance().stop()
Ejemplo n.º 18
0
 def callback(response, error):
     assert len(response) == 1
     test_shunt.register_called('got_record')
     tornado.ioloop.IOLoop.instance().stop()
Ejemplo n.º 19
0
 def update_callback(response, error):
     tornado.ioloop.IOLoop.instance().stop()
     logging.info(response)
     logging.info(error)
     assert isinstance(error, asyncmongo.RSConnectionError)
     test_shunt.register_called('update_f')
Ejemplo n.º 20
0
 def duplicate_callback(response, error):
     tornado.ioloop.IOLoop.instance().stop()
     logging.info(response)
     if error:
         test_shunt.register_called('dupe')