Module Expr Str Assign NameStore Str Import alias Import alias Import alias Import alias Import alias ImportFrom alias ImportFrom alias alias alias alias ImportFrom alias ImportFrom alias alias ImportFrom alias alias ImportFrom alias ImportFrom alias alias alias ClassDef bases AttributeLoad NameLoad attr body Expr Str FunctionDef arguments args NameParam defaults body FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr BinOpMod Str SubscriptLoad AttributeLoad NameLoad attr Index Str Expr Call AttributeLoad NameLoad attr decorator_list Expr Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str keyword Call NameLoad keyword Call AttributeLoad NameLoad attr Str keyword NameLoad keyword ListLoad Str keyword NameLoad decorator_list Call AttributeLoad NameLoad attr keyword NameLoad FunctionDef arguments args NameParam defaults body FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr decorator_list Expr Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str keyword Call NameLoad keyword Call AttributeLoad NameLoad attr Str keyword NameLoad keyword Dict Str Call AttributeLoad NameLoad attr Str keyword NameLoad decorator_list Call AttributeLoad NameLoad attr keyword NameLoad decorator_list ClassDef bases NameLoad AttributeLoad NameLoad attr body Expr Str FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword Num keyword NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Expr Call AttributeLoad Call AttributeLoad NameLoad attr attr keyword Str keyword Call NameLoad keyword Str keyword Str keyword NameLoad keyword Num keyword Num keyword NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call AttributeLoad NameLoad attr ListLoad TupleLoad Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr keyword Num FunctionDef arguments args defaults body Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr decorator_list Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults Num body Expr Str Return ListComp Call NameLoad Call AttributeLoad NameLoad attr Num BinOpLShift Num Num comprehension NameStore Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str Expr Call NameLoad decorator_list With Call AttributeLoad NameLoad attr NameLoad NameStore body For NameStore NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str keyword Str keyword BinOpMod Str TupleLoad NameLoad NameLoad keyword Call NameLoad NameLoad Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call NameLoad NameLoad Expr Call NameLoad decorator_list With Call AttributeLoad NameLoad attr NameLoad NameStore body For NameStore NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad keyword Str keyword Call NameLoad NameLoad NameLoad Call AttributeLoad NameLoad attr decorator_list decorator_list
N/A N/A Viewfinder web request handler tests.

  HandlerTestCase: sets up an HTTP server-based test case with
    ViewfinderHandler-derived handlers using asynchronous decorators.
 N/A __author__ spencer@emailscrubbed.com (Spencer Kimball) N/A logging N/A random N/A struct N/A sys N/A unittest functools partial tornado httpclient options web testing tornado.stack_context StackContext viewfinder.backend.base handler util viewfinder.backend.base.testing async_test BaseTestCase viewfinder.backend.db.local_client LocalClient viewfinder.backend.db.db_client DBClient DBKey DBKeySchema _DatastoreHandler N/A N/A web RequestHandler N/A N/A Handler for datastore database set/retrieval. get N/A N/A self N/A N/A _OnGet N/A N/A result N/A N/A N/A N/A N/A self write N/A %s N/A N/A result attributes N/A v N/A N/A N/A self finish N/A N/A N/A N/A N/A self _client GetItem table test key N/A DBKey hash_key N/A N/A self get_argument k range_key None attributes N/A v callback _OnGet N/A N/A N/A handler asynchronous datastore True post N/A N/A self N/A N/A _OnPut N/A N/A result N/A N/A N/A N/A N/A self write ok N/A N/A N/A self finish N/A N/A N/A N/A N/A self _client PutItem table test key N/A DBKey hash_key N/A N/A self get_argument k range_key None attributes N/A v N/A N/A self get_argument v callback _OnPut N/A N/A N/A handler asynchronous datastore True N/A HandlerTestCase N/A BaseTestCase N/A testing AsyncHTTPTestCase N/A N/A Sets up a web server which handles various backend asynchronous
  services, such as datastore db operations.
   setUp N/A N/A self N/A N/A N/A N/A N/A N/A super HandlerTestCase self setUp N/A N/A self http_client N/A N/A httpclient AsyncHTTPClient io_loop N/A self io_loop max_clients 100 force_instance True N/A N/A N/A options options localdb_dir N/A N/A N/A DBClient SetInstance N/A LocalClient None N/A N/A N/A N/A N/A DBClient Instance CreateTable table test hash_key_schema N/A DBKeySchema name k value_type S range_key_schema None read_units 10 write_units 5 callback None N/A get_app N/A N/A self N/A N/A N/A Creates a web server which handles:

     - GET  /datastore?k=<key> - retrieve value for <key>; shard is hash of key
     - POST /datastore?k=<key>&v=<value> - set datastore <key>:<value>; shard is hash of key
     N/A N/A N/A web Application N/A N/A /datastore _DatastoreHandler N/A testDatastore N/A N/A self N/A N/A N/A Test the webserver handles datastore key/value store and retrieval
    by inserting a collection of random values and verifying their
    retrieval, in parallel.
     N/A values N/A N/A self _CreateRandomValues num_values 100 _InsertDone N/A N/A N/A N/A N/A N/A N/A self _RetrieveValues values N/A self stop N/A N/A N/A N/A self _InsertValues values _InsertDone N/A async_test _CreateRandomValues N/A N/A self num_values N/A 100 N/A N/A Creates num_values random integers between [0, 1<<20)
     N/A N/A N/A int N/A N/A random uniform 0 N/A 1 20 N/A i N/A xrange num_values N/A _InsertValues N/A N/A self values callback N/A N/A N/A Inserts values into datastore via the tornado web server and
    invokes callback with the sequence of values when complete. The
    values are randomly distributed over the available shards.

    - The key of each value is computed as: 'k%d' % value
     _VerifyResponse N/A N/A cb resp N/A N/A N/A N/A N/A self assertEqual N/A resp body ok N/A N/A cb N/A N/A N/A N/A util Barrier callback b N/A N/A val values N/A N/A N/A N/A N/A self http_client fetch N/A N/A httpclient HTTPRequest N/A N/A self get_url /datastore method POST body N/A k=k%d&v=%d N/A val val callback N/A partial _VerifyResponse N/A N/A b Callback N/A _RetrieveValues N/A N/A self values callback N/A N/A N/A Retrieves and verifies the specified values from Datastore database
    via the tornado web server.
     _VerifyResponse N/A N/A val cb resp N/A N/A N/A N/A N/A self assertEqual N/A resp body N/A repr val N/A N/A cb N/A N/A N/A N/A util Barrier callback b N/A N/A val values N/A N/A N/A N/A N/A self http_client fetch N/A N/A httpclient HTTPRequest N/A N/A self get_url N/A /datastore?k=k%d val method GET callback N/A partial _VerifyResponse val N/A N/A b Callback N/A N/A