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()
 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()
 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')
 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')
 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()
 def update_callback(response, error):
     logging.info(response)
     assert len(response) == 1
     test_shunt.register_called('update')
     tornado.ioloop.IOLoop.instance().stop()
 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')
 def query_callback(response, error):
     logging.info(response)
     assert len(response) == 1
     test_shunt.register_called('retrieved')
     tornado.ioloop.IOLoop.instance().stop()
 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()
Exemple #10
0
 def insert_callback(response, error):
     tornado.ioloop.IOLoop.instance().stop()
     logging.info(response)
     assert len(response) == 1
     test_shunt.register_called('inserted')
Exemple #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')
 def query_callback(response, error):
     tornado.ioloop.IOLoop.instance().stop()
     logging.info(response)
     assert len(response) == 1
     test_shunt.register_called('retrieved')
 def delete_callback(response, error):
     logging.info(response)
     assert len(response) == 1
     test_shunt.register_called('deleted')
     tornado.ioloop.IOLoop.instance().stop()
 def callback(response, error):
     assert len(response) == 1
     test_shunt.register_called("got_record")
     tornado.ioloop.IOLoop.instance().stop()
 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')
Exemple #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()
 def duplicate_callback(response, error):
     logging.info(response)
     if error:
         test_shunt.register_called("dupe")
     tornado.ioloop.IOLoop.instance().stop()
Exemple #18
0
 def callback(response, error):
     assert len(response) == 1
     test_shunt.register_called('got_record')
     tornado.ioloop.IOLoop.instance().stop()
 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')
 def duplicate_callback(response, error):
     tornado.ioloop.IOLoop.instance().stop()
     logging.info(response)
     if error:
         test_shunt.register_called('dupe')