Skip to content

Commit 9820c86

Browse files
committed
Add wait method to test_unregistered_root_component
1 parent cc2836b commit 9820c86

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/test_asgi/test_middleware.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# ruff: noqa: S701
2+
import asyncio
23
from pathlib import Path
34

45
import pytest
@@ -75,6 +76,12 @@ def Stub():
7576
async with BackendFixture(app) as server:
7677
async with DisplayFixture(backend=server) as new_display:
7778
await new_display.show(Stub)
79+
80+
for _ in range(10):
81+
await asyncio.sleep(0.25)
82+
if len(server.log_records) > 0:
83+
break
84+
7885
assert (
7986
"Attempting to use an unregistered root component"
8087
in server.log_records[-1].message

0 commit comments

Comments
 (0)