(slow_server)
| 74 | |
| 75 | |
| 76 | def test_async_basic_dispatch(slow_server): |
| 77 | # Use a fast path: short delay server not needed; just prove awaitable works. |
| 78 | async def run(): |
| 79 | # point at a non-listening port to get a prompt connection error |
| 80 | from wigolo import WigoloConnectionError |
| 81 | |
| 82 | c = AsyncClient(base_url="http://127.0.0.1:1") |
| 83 | with pytest.raises(WigoloConnectionError): |
| 84 | await c.search(query="x", timeout=2) |
| 85 | await c.aclose() |
| 86 | |
| 87 | asyncio.run(run()) |