File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -1052,9 +1052,12 @@ def find():
10521052
10531053 run_with_profiling (find )
10541054
1055+ # MongoDB 3.1.5 changed the ns for commands.
1056+ regex = {'$regex' : 'pymongo_test.(\$cmd|test)' }
1057+
10551058 def count ():
10561059 self .db .test .find ().comment ('foo' ).count ()
1057- op = self .db .system .profile .find ({'ns' : 'pymongo_test.$cmd' ,
1060+ op = self .db .system .profile .find ({'ns' : regex ,
10581061 'op' : 'command' ,
10591062 'command.count' : 'test' ,
10601063 'command.$comment' : 'foo' })
@@ -1064,7 +1067,7 @@ def count():
10641067
10651068 def distinct ():
10661069 self .db .test .find ().comment ('foo' ).distinct ('type' )
1067- op = self .db .system .profile .find ({'ns' : 'pymongo_test.$cmd' ,
1070+ op = self .db .system .profile .find ({'ns' : regex ,
10681071 'op' : 'command' ,
10691072 'command.distinct' : 'test' ,
10701073 'command.$comment' : 'foo' })
You can’t perform that action at this time.
0 commit comments