Skip to content

Commit 85ad5bd

Browse files
author
A. Jesse Jiryu Davis
committed
Simplify test_comment.
1 parent 86f42f2 commit 85ad5bd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/test_cursor.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -953,7 +953,7 @@ def run_with_profiling(func):
953953
self.db.set_profiling_level(OFF)
954954

955955
def find():
956-
list(self.db.test.find({'type': 'string'}).comment('foo'))
956+
list(self.db.test.find().comment('foo'))
957957
op = self.db.system.profile.find({'ns': 'pymongo_test.test',
958958
'op': 'query',
959959
'query.$comment': 'foo'})
@@ -962,7 +962,7 @@ def find():
962962
run_with_profiling(find)
963963

964964
def count():
965-
self.db.test.find({'type': 'string'}).comment('foo').count()
965+
self.db.test.find().comment('foo').count()
966966
op = self.db.system.profile.find({'ns': 'pymongo_test.$cmd',
967967
'op': 'command',
968968
'command.count': 'test',
@@ -972,7 +972,7 @@ def count():
972972
run_with_profiling(count)
973973

974974
def distinct():
975-
self.db.test.find({'type': 'string'}).comment('foo').distinct('type')
975+
self.db.test.find().comment('foo').distinct('type')
976976
op = self.db.system.profile.find({'ns': 'pymongo_test.$cmd',
977977
'op': 'command',
978978
'command.distinct': 'test',

0 commit comments

Comments
 (0)