Module ImportFrom alias Expr Str Import alias Import alias ImportFrom alias alias ImportFrom alias ImportFrom alias ImportFrom alias alias ImportFrom alias ImportFrom alias ImportFrom alias Import alias Import alias Import alias ImportFrom alias ImportFrom alias alias alias ImportFrom alias ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr Expr Yield Call AttributeLoad NameLoad attr Dict Str Num Assign NameStore Yield Call AttributeLoad NameLoad attr Dict Str Num Expr Call AttributeLoad NameLoad attr Num SubscriptLoad NameLoad Index Str Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str keyword NameLoad decorator_list NameLoad FunctionDef arguments args NameParam defaults body For NameStore TupleLoad AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr AttributeLoad AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr attr body Expr Yield Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str Yield Call AttributeLoad NameLoad attr Dict Str Str Assign NameStore Yield Call AttributeLoad NameLoad attr Dict Str Str Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str Str Expr Yield Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Yield Call AttributeLoad NameLoad attr Dict Str Str decorator_list NameLoad FunctionDef arguments args NameParam defaults body TryExcept body Expr Call AttributeLoad AttributeLoad NameLoad attr attr handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr CompareIn Str Call NameLoad NameLoad orelse Expr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore AttributeLoad NameLoad attr Expr Yield Call AttributeLoad NameLoad attr ListLoad Dict Str Num Dict Str Num Assign NameStore ListLoad Assign NameStore ListLoad Call NameLoad Call NameLoad FunctionDef arguments args NameParam NameParam defaults body If NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad Call AttributeLoad NameLoad attr attr NameLoad decorator_list Expr Call AttributeLoad Call AttributeLoad Call AttributeLoad NameLoad attr Dict Str Str Num Call NameLoad Num attr Num attr NameLoad Expr Call AttributeLoad Call AttributeLoad Call AttributeLoad NameLoad attr Dict Str Num attr Num attr NameLoad Expr Yield NameLoad Expr Call AttributeLoad NameLoad attr ListLoad Dict Str Num Dict Str Num NameLoad decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Yield Call AttributeLoad AttributeLoad NameLoad attr attr Dict Str Num Assign NameStore Yield Call AttributeLoad AttributeLoad NameLoad attr attr Dict Str Num Dict Str Dict Str Str Expr Call AttributeLoad NameLoad attr Num SubscriptLoad NameLoad Index Str Expr Call AttributeLoad NameLoad attr NameLoad SubscriptLoad NameLoad Index Str Expr Call AttributeLoad NameLoad attr Num SubscriptLoad NameLoad Index Str Expr Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr Str decorator_list NameLoad FunctionDef arguments args NameParam defaults body Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Expr Yield Call AttributeLoad NameLoad attr Str keyword NameLoad TryFinally body Expr Yield Call AttributeLoad NameLoad attr ListLoad Dict Str Num Dict Str Num With Call AttributeLoad NameLoad attr NameLoad body Expr Yield Call AttributeLoad NameLoad attr Dict Str Num Dict Str Dict Str Num finalbody Expr Yield Call AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Yield Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Dict Dict decorator_list NameLoad FunctionDef arguments args NameParam defaults body Assign NameStore AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Num Yield Call AttributeLoad NameLoad attr Dict Str Num decorator_list NameLoad FunctionDef arguments args NameParam defaults body Assign NameStore AttributeLoad NameLoad attr Expr Yield Call AttributeLoad NameLoad attr Dict Str Num With Call AttributeLoad NameLoad attr NameLoad body Expr Yield Call AttributeLoad NameLoad attr ListLoad Dict Str Num Dict Str Num Dict Str Num Expr Call AttributeLoad NameLoad attr Call NameLoad ListLoad Num Num Call NameLoad Yield Call AttributeLoad NameLoad attr Str decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Yield Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Dict decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Num Yield Call AttributeLoad AttributeLoad NameLoad attr attr Dict Str Num decorator_list NameLoad FunctionDef arguments args NameParam defaults body Assign NameStore AttributeLoad NameLoad attr Assign NameStore Yield Call AttributeLoad NameLoad attr Dict Str Str Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad NameLoad decorator_list NameLoad FunctionDef arguments args NameParam defaults body Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Expr Yield Call AttributeLoad NameLoad attr Str keyword NameLoad Expr Yield Call AttributeLoad NameLoad attr Dict Str Num TryFinally body With Call AttributeLoad NameLoad attr NameLoad body Expr Yield Call AttributeLoad NameLoad attr Dict Str Num finalbody Expr Yield Call AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Yield Call AttributeLoad AttributeLoad NameLoad attr attr Dict Str Num Assign NameStore Yield Call AttributeLoad AttributeLoad NameLoad attr attr Dict Str Num Expr Call AttributeLoad NameLoad attr Num SubscriptLoad NameLoad Index Str Expr Call AttributeLoad NameLoad attr Num SubscriptLoad NameLoad Index Str Expr Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr Str Assign NameStore Yield Call AttributeLoad AttributeLoad NameLoad attr attr Dict Str Num Expr Call AttributeLoad NameLoad attr Num SubscriptLoad NameLoad Index Str Expr Call AttributeLoad NameLoad attr Num SubscriptLoad NameLoad Index Str Expr Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr Str decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Yield Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Assign NameStore AttributeLoad NameLoad attr Expr Yield Call AttributeLoad NameLoad attr Expr Yield Call AttributeLoad NameLoad attr ListComp Dict Str NameLoad comprehension NameStore Call NameLoad Num Expr Call AttributeLoad NameLoad attr Dict Str Num keyword Num Expr Call AttributeLoad NameLoad attr Dict Str Num keyword Num Expr Call AttributeLoad NameLoad attr Dict Str Num keyword Num While Yield Call AttributeLoad NameLoad attr body Expr Yield Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Dict Str Num keyword Num While UnaryOpNot Yield Call AttributeLoad NameLoad attr body Expr Yield Call AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad NameLoad attr Dict Str Num Expr Yield Call AttributeLoad NameLoad attr Dict Str Num keyword Num With Call AttributeLoad NameLoad attr NameLoad body Expr Yield NameLoad decorator_list NameLoad FunctionDef arguments args NameParam defaults body Assign NameStore Str Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Expr Call AttributeLoad NameLoad attr Dict Str Num keyword Num While UnaryOpNot Yield Call AttributeLoad NameLoad attr Dict Str Num body Expr Yield Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Dict Str Num Expr Yield Call AttributeLoad NameLoad attr Dict Str Num keyword Num Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Assign NameStore AttributeLoad NameLoad attr Expr Yield Call AttributeLoad NameLoad attr Dict Str Num Expr Call AttributeLoad NameLoad attr Dict Str Num Dict Str Dict Str Num keyword Num While UnaryOpNot Yield Call AttributeLoad NameLoad attr Dict Str Num body Expr Yield Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Assign NameStore ListLoad Num Assign NameStore Call NameLoad Expr Yield Call AttributeLoad AttributeLoad NameLoad attr attr Expr Yield Call AttributeLoad AttributeLoad NameLoad attr attr Dict Str Num FunctionDef arguments args NameParam NameParam defaults body If NameLoad body Raise NameLoad If UnaryOpNot NameLoad body Return AugAssignAdd SubscriptStore NameLoad Index Num Num If CompareLt SubscriptLoad NameLoad Index Num Num body Expr Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr Dict Str Num attr NameLoad orelse Expr Call AttributeLoad NameLoad attr NameLoad decorator_list Expr Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr Dict Str Num attr NameLoad Expr Yield NameLoad Expr Call AttributeLoad NameLoad attr Num SubscriptLoad NameLoad Index Num decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Yield Call AttributeLoad NameLoad attr Assign NameStore ListLoad Dict Str Str Num Num Dict Str Str Num Num Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str Expr Yield Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore Yield Call AttributeLoad NameLoad attr NameLoad NameLoad Str Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad AttributeLoad NameLoad attr BinOpMod Str NameLoad Assign NameStore Yield Call AttributeLoad Call AttributeLoad Call AttributeLoad NameLoad attr attr ListLoad TupleLoad Str Num attr keyword Num Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Yield Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Assign NameStore Yield Call AttributeLoad NameLoad attr NameLoad NameLoad Str keyword NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad NameLoad BinOpMod Str NameLoad Expr Call AttributeLoad NameLoad attr Str SubscriptLoad NameLoad Index Str Assign NameStore Yield Call AttributeLoad Call AttributeLoad Call AttributeLoad NameLoad attr attr ListLoad TupleLoad Str Num attr keyword Num Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Yield Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Assign NameStore Yield Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr keyword Lambda arguments args NameParam defaults SubscriptLoad NameLoad Index Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list NameLoad FunctionDef arguments args NameParam defaults body Assign NameStore AttributeLoad NameLoad attr Assign NameStore Yield Call AttributeLoad NameLoad attr ListLoad TupleLoad Str Num Assign NameStore Yield Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr ListLoad TupleLoad Str Num SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index Str Assign NameStore Yield Call AttributeLoad NameLoad attr ListLoad TupleLoad Str Num Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Yield Call AttributeLoad NameLoad attr ListLoad TupleLoad Str Num Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Yield Call AttributeLoad NameLoad attr ListLoad TupleLoad Str Num Assign NameStore Yield Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call NameLoad ListComp CompareEq SubscriptLoad NameLoad Index Str ListLoad TupleLoad Str Num comprehension NameStore Call AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Yield Call AttributeLoad AttributeLoad NameLoad attr attr Str Expr Yield Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr ListComp Dict Str NameLoad comprehension NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad Call NameLoad NameLoad Raise Call AttributeLoad NameLoad attr NameLoad decorator_list AttributeLoad NameLoad attr Assign NameStore Dict Str Dict Str Str FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad Call NameLoad GeneratorExp SubscriptLoad NameLoad Index Str comprehension NameStore NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Yield Call NameLoad AttributeLoad NameLoad attr TupleLoad Num Num Num Assign NameStore Call NameLoad FunctionDef arguments args NameParam NameParam defaults body If NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad orelse Expr Call AttributeLoad NameLoad attr NameLoad decorator_list Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad Expr Yield NameLoad If NameLoad body With Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr AttributeLoad NameLoad attr keyword NameLoad decorator_list NameLoad FunctionDef arguments args NameParam defaults body Assign NameStore Yield Call NameLoad AttributeLoad NameLoad attr TupleLoad Num Num Num Assign NameStore AttributeLoad NameLoad attr For NameStore TupleLoad Num Num body Assign NameStore Yield Call AttributeLoad NameLoad attr NameLoad Assign NameStore Yield Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad SubscriptLoad NameLoad Index Str If NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign NameStore Yield Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list NameLoad FunctionDef arguments args NameParam defaults body If UnaryOpNot Yield Call NameLoad AttributeLoad NameLoad attr TupleLoad Num Num Num body Raise Call NameLoad Str Assign NameStore AttributeLoad NameLoad attr For NameStore TupleLoad Num Num body Assign NameStore Yield Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign NameStore Call NameLoad FunctionDef arguments args NameParam NameParam defaults body If NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad orelse Expr Call AttributeLoad NameLoad attr NameLoad decorator_list Expr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Assign NameStore Yield NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list NameLoad FunctionDef arguments args NameParam defaults body If UnaryOpNot Yield Call NameLoad AttributeLoad NameLoad attr TupleLoad Num Num Num body Raise Call NameLoad Str Expr Yield Call NameLoad AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Expr Yield Call AttributeLoad NameLoad attr Expr Yield Call AttributeLoad NameLoad attr GeneratorExp Dict Str NameLoad comprehension NameStore Call NameLoad Num keyword AttributeLoad AttributeLoad NameLoad attr attr If AttributeLoad AttributeLoad NameLoad attr attr body Assign NameStore Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore ListLoad FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad AttributeLoad AttributeLoad NameLoad attr attr While Yield AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr decorator_list AttributeLoad NameLoad attr Assign NameStore Yield Call AttributeLoad NameLoad attr Num Expr Yield ListComp Call NameLoad NameLoad comprehension NameStore NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Yield Call AttributeLoad NameLoad attr decorator_list Call NameLoad keyword Num FunctionDef arguments args NameParam defaults body Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad decorator_list decorator_list If CompareEq NameLoad Str body Expr Call AttributeLoad NameLoad attr
N/A __future__ unicode_literals N/A Test Motor, an asynchronous driver for MongoDB and Tornado. N/A unittest N/A bson bson.binary JAVA_LEGACY OLD_UUID_SUBTYPE bson.objectid ObjectId pymongo ReadPreference pymongo.errors DuplicateKeyError InvalidOperation tornado gen tornado.concurrent Future tornado.testing gen_test N/A motor N/A motor.motor_tornado N/A test test SkipTest test.tornado_tests at_least MotorTest skip_if_mongos test.utils delay MotorCollectionTest N/A MotorTest N/A test_collection N/A N/A self N/A N/A N/A collection N/A N/A motor MotorCollection N/A self db test_collection N/A N/A N/A self assertEqual test_collection N/A collection name N/A N/A N/A N/A collection insert N/A _id 1 N/A doc N/A N/A N/A collection find_one N/A _id 1 N/A N/A N/A self assertEqual 1 N/A doc N/A _id N/A N/A N/A self assertRaises TypeError N/A motor MotorCollection N/A self db test_collection capped True N/A gen_test test_dotted_collection_name N/A N/A self N/A N/A N/A coll N/A N/A N/A N/A self db foo bar N/A N/A N/A N/A self db foo bar baz N/A N/A N/A N/A N/A coll remove N/A N/A N/A self assertEqual xyzzy N/A N/A N/A coll insert N/A _id xyzzy N/A result N/A N/A N/A coll find_one N/A _id xyzzy N/A N/A N/A self assertEqual N/A result N/A _id xyzzy N/A N/A N/A N/A coll remove N/A N/A N/A self assertEqual None N/A N/A N/A coll find_one N/A _id xyzzy N/A gen_test test_call N/A N/A self N/A N/A N/A N/A N/A N/A N/A N/A self db foo N/A N/A N/A TypeError N/A e N/A N/A N/A N/A self assertTrue N/A no such method exists N/A str e N/A N/A N/A N/A self fail Expected TypeError N/A test_find_is_async N/A N/A self N/A N/A N/A coll N/A self collection N/A N/A N/A N/A coll insert N/A N/A _id 1 N/A _id 2 N/A results N/A N/A futures N/A N/A Future N/A Future callback N/A N/A result error N/A N/A N/A result N/A N/A N/A N/A results append result N/A N/A N/A N/A N/A futures pop set_result None N/A N/A N/A N/A N/A N/A N/A N/A coll find N/A _id $where 1 N/A delay 0.5 limit 1 each callback N/A N/A N/A N/A N/A N/A N/A coll find N/A _id 2 limit 1 each callback N/A N/A futures N/A N/A N/A self assertEqual N/A N/A _id 2 N/A _id 1 results N/A gen_test test_update N/A N/A self N/A N/A N/A N/A N/A N/A N/A self collection insert N/A _id 1 N/A result N/A N/A N/A N/A self collection update N/A _id 1 N/A $set N/A foo bar N/A N/A N/A self assertEqual 1 N/A result N/A ok N/A N/A N/A self assertEqual True N/A result N/A updatedExisting N/A N/A N/A self assertEqual 1 N/A result N/A n N/A N/A N/A self assertEqual None N/A N/A result get err N/A gen_test test_update_bad N/A N/A self N/A N/A N/A coll N/A N/A self db unique_collection N/A N/A N/A N/A coll ensure_index s unique True N/A N/A N/A N/A N/A N/A coll insert N/A N/A s 1 N/A s 2 N/A N/A N/A self assertRaises DuplicateKeyError N/A N/A N/A N/A N/A coll update N/A s 2 N/A $set N/A s 1 N/A N/A N/A N/A N/A coll drop N/A gen_test test_update_callback N/A N/A self N/A N/A N/A N/A N/A N/A self check_optional_callback N/A N/A self collection update N/A N/A N/A gen_test test_insert N/A N/A self N/A N/A N/A collection N/A self collection N/A N/A N/A self assertEqual 201 N/A N/A N/A collection insert N/A _id 201 N/A gen_test test_insert_many_one_bad N/A N/A self N/A N/A N/A collection N/A self collection N/A N/A N/A N/A collection insert N/A _id 2 N/A N/A N/A self assertRaises DuplicateKeyError N/A N/A N/A N/A N/A collection insert N/A N/A _id 1 N/A _id 2 N/A _id 3 N/A N/A N/A self assertEqual N/A set N/A 1 2 N/A set N/A N/A N/A collection distinct _id N/A gen_test test_save_callback N/A N/A self N/A N/A N/A N/A N/A N/A self check_optional_callback N/A N/A self collection save N/A N/A gen_test test_save_with_id N/A N/A self N/A N/A N/A N/A N/A self assertEqual 5 N/A N/A N/A N/A self collection save N/A _id 5 N/A gen_test test_save_without_id N/A N/A self N/A N/A N/A collection N/A self collection N/A result N/A N/A N/A collection save N/A fiddle faddle N/A N/A N/A self assertTrue N/A isinstance result ObjectId N/A gen_test test_save_bad N/A N/A self N/A N/A N/A coll N/A N/A self db unique_collection N/A N/A N/A N/A coll ensure_index s unique True N/A N/A N/A N/A coll save N/A s 1 N/A N/A N/A N/A N/A self assertRaises DuplicateKeyError N/A N/A N/A N/A N/A coll save N/A s 1 N/A N/A N/A N/A N/A coll drop N/A gen_test test_remove N/A N/A self N/A N/A N/A N/A N/A N/A N/A self collection insert N/A _id 1 N/A result N/A N/A N/A N/A self collection remove N/A _id 1 N/A N/A N/A self assertEqual 1 N/A result N/A n N/A N/A N/A self assertEqual 1 N/A result N/A ok N/A N/A N/A self assertEqual None N/A N/A result get err N/A result N/A N/A N/A N/A self collection remove N/A _id 1 N/A N/A N/A self assertEqual 0 N/A result N/A n N/A N/A N/A self assertEqual 1 N/A result N/A ok N/A N/A N/A self assertEqual None N/A N/A result get err N/A gen_test test_remove_callback N/A N/A self N/A N/A N/A N/A N/A N/A self check_optional_callback N/A N/A self collection remove N/A gen_test test_unacknowledged_remove N/A N/A self N/A N/A N/A coll N/A self collection N/A N/A N/A N/A coll remove N/A N/A N/A N/A coll insert N/A N/A _id i N/A i N/A range 3 N/A N/A N/A coll remove N/A _id 0 w 0 N/A N/A N/A coll remove N/A _id 1 w 0 N/A N/A N/A coll remove N/A _id 2 w 0 N/A N/A N/A N/A coll count N/A N/A N/A N/A N/A self pause 0.1 N/A N/A N/A N/A N/A coll database connection close N/A gen_test test_unacknowledged_insert N/A N/A self N/A N/A N/A coll N/A N/A self db test_unacknowledged_insert N/A N/A N/A coll insert N/A _id 1 w 0 N/A N/A N/A N/A N/A coll count N/A N/A N/A N/A N/A self pause 0.1 N/A future N/A N/A coll insert N/A _id 1 N/A N/A N/A N/A coll insert N/A _id 1 w 0 N/A N/A N/A self assertRaises DuplicateKeyError N/A N/A N/A future N/A gen_test test_unacknowledged_save N/A N/A self N/A N/A N/A collection_name test_unacknowledged_save N/A coll N/A N/A self db N/A collection_name N/A N/A N/A coll save N/A _id 201 w 0 N/A N/A N/A N/A N/A coll find_one N/A _id 201 N/A N/A N/A N/A N/A self pause 0.1 N/A N/A N/A coll save N/A _id 201 N/A N/A N/A N/A coll save N/A _id 201 w 0 N/A N/A N/A N/A N/A coll database connection close N/A gen_test test_unacknowledged_update N/A N/A self N/A N/A N/A coll N/A self collection N/A N/A N/A N/A coll insert N/A _id 1 N/A N/A N/A coll update N/A _id 1 N/A $set N/A a 1 w 0 N/A N/A N/A N/A N/A coll find_one N/A a 1 N/A N/A N/A N/A N/A self pause 0.1 N/A N/A N/A N/A N/A coll database connection close N/A gen_test test_nested_callbacks N/A N/A self N/A N/A N/A results N/A 0 N/A future N/A Future N/A N/A N/A N/A N/A self collection remove N/A N/A N/A N/A N/A self collection insert N/A _id 1 callback N/A N/A result error N/A N/A N/A error N/A N/A error N/A N/A result N/A N/A N/A N/A results N/A 0 1 N/A N/A N/A results N/A 0 1000 N/A N/A N/A N/A N/A N/A N/A self collection find N/A _id 1 each callback N/A N/A N/A N/A future set_result None N/A N/A N/A N/A N/A N/A N/A self collection find N/A _id 1 each callback N/A N/A future N/A N/A N/A self assertEqual 1000 N/A results N/A 0 N/A gen_test test_map_reduce N/A N/A self N/A N/A N/A N/A N/A N/A self make_test_data N/A expected_result N/A N/A _id value 0 100 N/A _id value 1 100 N/A map_fn N/A N/A bson Code function map() { emit(this._id % 2, 1); } N/A reduce_fn N/A N/A bson Code 
        function reduce(key, values) {
            r = 0;
            values.forEach(function(value) { r += value; });
            return r;
        } N/A N/A N/A N/A N/A N/A self db tmp_mr drop N/A collection N/A self collection N/A tmp_mr N/A N/A N/A collection map_reduce map_fn reduce_fn tmp_mr N/A N/A N/A self assertTrue N/A isinstance tmp_mr N/A motor MotorCollection N/A map_reduce should return MotorCollection, not %s tmp_mr N/A result N/A N/A N/A N/A N/A N/A N/A tmp_mr find sort N/A N/A _id 1 to_list length 1000 N/A N/A N/A self assertEqual expected_result result N/A N/A N/A N/A N/A N/A self db tmp_mr drop N/A response N/A N/A N/A collection map_reduce map_fn reduce_fn tmp_mr full_response True N/A N/A N/A self assertTrue N/A isinstance response dict N/A map_reduce should return dict, not %s response N/A N/A N/A self assertEqual tmp_mr N/A response N/A result N/A result N/A N/A N/A N/A N/A N/A N/A tmp_mr find sort N/A N/A _id 1 to_list length 1000 N/A N/A N/A self assertEqual expected_result result N/A N/A N/A N/A N/A N/A self db tmp_mr drop N/A result N/A N/A N/A collection inline_map_reduce map_fn reduce_fn N/A N/A N/A result sort key N/A N/A N/A doc N/A N/A doc N/A _id N/A N/A N/A self assertEqual expected_result result N/A gen_test test_indexes N/A N/A self N/A N/A N/A test_collection N/A self collection N/A idx_name N/A N/A N/A test_collection create_index N/A N/A foo 1 N/A index_info N/A N/A N/A test_collection index_information N/A N/A N/A self assertEqual N/A N/A foo 1 N/A N/A index_info N/A idx_name N/A key N/A result N/A N/A N/A test_collection ensure_index N/A N/A foo 1 N/A N/A N/A self assertEqual None result N/A result2 N/A N/A N/A test_collection ensure_index N/A N/A foo 1 N/A N/A N/A self assertEqual None result2 N/A N/A N/A N/A test_collection ensure_index N/A N/A bar 1 N/A index_info N/A N/A N/A test_collection index_information N/A N/A N/A self assertTrue N/A any N/A N/A N/A info N/A key N/A N/A bar 1 N/A info N/A N/A index_info values N/A gen_test _make_test_data N/A N/A self n N/A N/A N/A N/A N/A N/A N/A self db drop_collection test N/A N/A N/A N/A N/A N/A self db test insert N/A N/A _id i N/A i N/A range n N/A expected_sum N/A sum N/A range n N/A N/A N/A gen Return expected_sum N/A N/A gen coroutine N/A pipeline N/A $project N/A _id $_id assertAllDocs N/A N/A self expected_sum docs N/A N/A N/A N/A N/A self assertEqual expected_sum N/A sum N/A N/A doc N/A _id N/A doc docs N/A test_aggregate_callback N/A N/A self N/A N/A N/A mongo_2_5_1 N/A N/A at_least N/A self cx N/A 2 5 1 N/A future N/A Future cb N/A N/A result error N/A N/A N/A error N/A N/A N/A N/A future set_exception error N/A N/A N/A N/A future set_result result N/A N/A N/A N/A N/A N/A self db test aggregate N/A self pipeline cursor False callback cb N/A N/A future N/A mongo_2_5_1 N/A N/A N/A N/A self assertRaises InvalidOperation N/A N/A N/A N/A N/A N/A self db test aggregate N/A self pipeline callback cb N/A gen_test test_aggregation_cursor N/A N/A self N/A N/A N/A mongo_2_5_1 N/A N/A at_least N/A self cx N/A 2 5 1 N/A db N/A self db N/A collection_size N/A 10 1000 N/A N/A expected_sum N/A N/A N/A self _make_test_data collection_size N/A reply N/A N/A N/A N/A db test aggregate N/A self pipeline cursor False N/A N/A N/A self assertAllDocs expected_sum N/A reply N/A result N/A mongo_2_5_1 N/A N/A cursor N/A N/A N/A db test aggregate N/A self pipeline N/A docs N/A N/A N/A cursor to_list collection_size N/A N/A N/A self assertAllDocs expected_sum docs N/A gen_test test_aggregation_cursor_to_list_callback N/A N/A self N/A N/A N/A N/A N/A N/A at_least N/A self cx N/A 2 5 1 N/A N/A N/A SkipTest Aggregation cursor requires MongoDB >= 2.5.1 N/A db N/A self db N/A collection_size N/A 10 1000 N/A N/A expected_sum N/A N/A N/A self _make_test_data collection_size N/A cursor N/A N/A N/A db test aggregate N/A self pipeline N/A future N/A Future cb N/A N/A result error N/A N/A N/A error N/A N/A N/A N/A future set_exception error N/A N/A N/A N/A future set_result result N/A N/A N/A N/A cursor to_list collection_size callback cb N/A docs N/A future N/A N/A N/A self assertAllDocs expected_sum docs N/A gen_test test_parallel_scan N/A N/A self N/A N/A N/A N/A N/A N/A at_least N/A self cx N/A 2 5 5 N/A N/A N/A SkipTest Requires MongoDB >= 2.5.5 N/A N/A N/A skip_if_mongos N/A self cx N/A collection N/A self collection N/A N/A N/A N/A collection remove N/A N/A N/A N/A collection insert N/A N/A _id i N/A i N/A range 8000 w N/A N/A test env w N/A N/A N/A test env is_replica_set N/A N/A client N/A N/A self motor_rsc N/A N/A client read_preference N/A ReadPreference SECONDARY N/A collection N/A N/A client motor_test test_collection N/A docs N/A f N/A N/A cursor N/A N/A N/A N/A N/A self assertTrue N/A isinstance cursor N/A N/A motor motor_tornado MotorCommandCursor N/A N/A N/A cursor fetch_next N/A N/A N/A N/A docs append N/A N/A cursor next_object N/A N/A gen coroutine N/A cursors N/A N/A N/A collection parallel_scan 3 N/A N/A N/A N/A f cursor N/A cursor cursors N/A N/A N/A self assertEqual N/A len docs N/A N/A N/A collection count N/A N/A gen_test timeout 30 test_uuid_subtype N/A N/A self N/A N/A N/A collection N/A N/A self db test N/A N/A N/A self assertEqual N/A collection uuid_subtype OLD_UUID_SUBTYPE N/A N/A collection uuid_subtype JAVA_LEGACY N/A N/A N/A self assertEqual N/A collection uuid_subtype JAVA_LEGACY N/A N/A N/A N/A __name__ __main__ N/A N/A N/A N/A unittest main