コード例 #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()
コード例 #2
0
ファイル: test_pooled_db.py プロジェクト: beaufour/asyncmongo
 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()
コード例 #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')
コード例 #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')
コード例 #5
0
ファイル: test_pooled_db.py プロジェクト: beaufour/asyncmongo
 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()
コード例 #6
0
 def update_callback(response, error):
     logging.info(response)
     assert len(response) == 1
     test_shunt.register_called('update')
     tornado.ioloop.IOLoop.instance().stop()
コード例 #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')
コード例 #8
0
 def query_callback(response, error):
     logging.info(response)
     assert len(response) == 1
     test_shunt.register_called('retrieved')
     tornado.ioloop.IOLoop.instance().stop()
コード例 #9
0
ファイル: test_pooled_db.py プロジェクト: wpjunior/asyncmongo
 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()
コード例 #10
0
 def insert_callback(response, error):
     tornado.ioloop.IOLoop.instance().stop()
     logging.info(response)
     assert len(response) == 1
     test_shunt.register_called('inserted')
コード例 #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')
コード例 #12
0
 def query_callback(response, error):
     tornado.ioloop.IOLoop.instance().stop()
     logging.info(response)
     assert len(response) == 1
     test_shunt.register_called('retrieved')
コード例 #13
0
 def delete_callback(response, error):
     logging.info(response)
     assert len(response) == 1
     test_shunt.register_called('deleted')
     tornado.ioloop.IOLoop.instance().stop()
コード例 #14
0
 def callback(response, error):
     assert len(response) == 1
     test_shunt.register_called("got_record")
     tornado.ioloop.IOLoop.instance().stop()
コード例 #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')
コード例 #16
0
ファイル: storage_test.py プロジェクト: pedia/stuff
 def find_callback(response, error):
     logging.info('find: %s', response)
     # assert len(response) == 1
     test_shunt.register_called('find')        
     tornado.ioloop.IOLoop.instance().stop()
コード例 #17
0
 def duplicate_callback(response, error):
     logging.info(response)
     if error:
         test_shunt.register_called("dupe")
     tornado.ioloop.IOLoop.instance().stop()
コード例 #18
0
 def callback(response, error):
     assert len(response) == 1
     test_shunt.register_called('got_record')
     tornado.ioloop.IOLoop.instance().stop()
コード例 #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')
コード例 #20
0
 def duplicate_callback(response, error):
     tornado.ioloop.IOLoop.instance().stop()
     logging.info(response)
     if error:
         test_shunt.register_called('dupe')