Esempio 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()
Esempio 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()
Esempio 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')
Esempio 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')
Esempio 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()
Esempio 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()
Esempio 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')
Esempio 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()
Esempio 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()
Esempio 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')
Esempio 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')
 def query_callback(response, error):
     tornado.ioloop.IOLoop.instance().stop()
     logging.info(response)
     assert len(response) == 1
     test_shunt.register_called('retrieved')
Esempio 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()
Esempio n. 14
0
 def callback(response, error):
     assert len(response) == 1
     test_shunt.register_called("got_record")
     tornado.ioloop.IOLoop.instance().stop()
Esempio 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')
Esempio 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()
 def duplicate_callback(response, error):
     logging.info(response)
     if error:
         test_shunt.register_called("dupe")
     tornado.ioloop.IOLoop.instance().stop()
Esempio n. 18
0
 def callback(response, error):
     assert len(response) == 1
     test_shunt.register_called('got_record')
     tornado.ioloop.IOLoop.instance().stop()
Esempio 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')
Esempio n. 20
0
 def duplicate_callback(response, error):
     tornado.ioloop.IOLoop.instance().stop()
     logging.info(response)
     if error:
         test_shunt.register_called('dupe')