File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -68,10 +68,11 @@ async def _test_ops(
68
68
await coll .insert_one ({})
69
69
maybe_cursor = await db .validate_collection (* args , ** kwargs )
70
70
else :
71
- coll .create_index ( "a" )
72
- if iscoroutinefunction ( h ):
71
+ if iscoroutinefunction ( coll .create_index ):
72
+ await coll . create_index ( "a" )
73
73
maybe_cursor = await h (* args , ** kwargs )
74
74
else :
75
+ coll .create_index ("a" )
75
76
maybe_cursor = h (* args , ** kwargs )
76
77
self .assertIn (
77
78
"comment" ,
Original file line number Diff line number Diff line change @@ -68,7 +68,10 @@ def _test_ops(
68
68
coll .insert_one ({})
69
69
maybe_cursor = db .validate_collection (* args , ** kwargs )
70
70
else :
71
- coll .create_index ("a" )
71
+ if iscoroutinefunction (coll .create_index ):
72
+ coll .create_index ("a" )
73
+ else :
74
+ coll .create_index ("a" )
72
75
if iscoroutinefunction (h ):
73
76
maybe_cursor = h (* args , ** kwargs )
74
77
else :
You can’t perform that action at this time.
0 commit comments