File tree Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Original file line number Diff line number Diff line change 15
15
"""Authentication Tests."""
16
16
from __future__ import annotations
17
17
18
+ import asyncio
18
19
import os
19
20
import sys
20
21
import threading
@@ -75,9 +76,12 @@ def __init__(self, collection):
75
76
self .collection = collection
76
77
self .success = False
77
78
78
- async def run (self ):
79
- assert await self .collection .find_one ({"$where" : delay (1 )}) is not None
80
- self .success = True
79
+ def run (self ):
80
+ async def _run_async (self ):
81
+ assert await self .collection .find_one ({"$where" : delay (1 )}) is not None
82
+ self .success = True
83
+
84
+ asyncio .run (self .run_async ())
81
85
82
86
83
87
class TestGSSAPI (unittest .IsolatedAsyncioTestCase ):
Original file line number Diff line number Diff line change 15
15
"""Authentication Tests."""
16
16
from __future__ import annotations
17
17
18
+ import asyncio
18
19
import os
19
20
import sys
20
21
import threading
@@ -76,8 +77,11 @@ def __init__(self, collection):
76
77
self .success = False
77
78
78
79
def run (self ):
79
- assert self .collection .find_one ({"$where" : delay (1 )}) is not None
80
- self .success = True
80
+ def _run_async (self ):
81
+ assert self .collection .find_one ({"$where" : delay (1 )}) is not None
82
+ self .success = True
83
+
84
+ asyncio .run (self .run_async ())
81
85
82
86
83
87
class TestGSSAPI (unittest .TestCase ):
You can’t perform that action at this time.
0 commit comments