Skip to content

Commit b426524

Browse files
address review comments
1 parent 5271d01 commit b426524

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/server/request_handlers/test_default_request_handler.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1340,9 +1340,10 @@ async def single_event_stream():
13401340
def create_task_spy(coro):
13411341
nonlocal produced_task, cleanup_task
13421342
task = orig_create_task(coro)
1343-
if produced_task is None:
1343+
# Inspect the coroutine name to make the spy more robust
1344+
if coro.__name__ == '_run_event_stream':
13441345
produced_task = task
1345-
else:
1346+
elif coro.__name__ == '_cleanup_producer':
13461347
cleanup_task = task
13471348
return task
13481349

0 commit comments

Comments
 (0)