File tree Expand file tree Collapse file tree 1 file changed +0
-17
lines changed Expand file tree Collapse file tree 1 file changed +0
-17
lines changed Original file line number Diff line number Diff line change @@ -91,23 +91,6 @@ class Person(Document):
9191 {"_id" : p3 .pk , "name" : "SANDRA MARA" },
9292 ]
9393
94- def test_aggregation_comment (self ):
95- """Make sure adding a comment to the query gets added to the query"""
96- mongo_ver = get_mongodb_version ()
97-
98- class AggPerson (Document ):
99- name = StringField ()
100-
101- AggPerson .drop_collection ()
102-
103- pipeline = [{"$project" : {"name" : {"$toUpper" : "$name" }}}]
104- comment = "some_comment"
105- with db_ops_tracker () as q :
106- _ = list (AggPerson .objects .comment (comment ).aggregate (pipeline ))
107- query_op = q .db .system .profile .find ({"ns" : "mongoenginetest.agg_person" })[0 ]
108- CMD_QUERY_KEY = "command" if mongo_ver >= MONGODB_36 else "query"
109- assert query_op [CMD_QUERY_KEY ]["comment" ] == comment
110-
11194 def test_aggregation_propagates_hint_collation_and_comment (self ):
11295 """Make sure adding a hint/comment/collation to the query gets added to the query"""
11396 mongo_ver = get_mongodb_version ()
You can’t perform that action at this time.
0 commit comments