Support custom connectors

This commit is contained in:
Lonami Exo
2023-10-29 21:45:21 +01:00
parent d80c6b3bb4
commit 6e88264b28
8 changed files with 161 additions and 51 deletions

View File

@@ -21,7 +21,13 @@ async def test_invoke_encrypted_method(caplog: LogCaptureFixture) -> None:
return deadline - asyncio.get_running_loop().time()
sender = await asyncio.wait_for(
connect(Full(), *TELEGRAM_TEST_DC, logging.getLogger(__file__)),
connect(
Full(),
*TELEGRAM_TEST_DC,
auth_key=None,
base_logger=logging.getLogger(__file__),
connector=lambda ip, port: asyncio.open_connection(ip, port),
),
timeout(),
)