Continue documentation and reducing public API

This commit is contained in:
Lonami Exo
2023-10-08 15:07:18 +02:00
parent 25a2b53d3f
commit 7fabf7da0a
35 changed files with 887 additions and 735 deletions

View File

@@ -4,11 +4,10 @@ import logging
from pytest import LogCaptureFixture, mark
from telethon._impl.mtproto import Full
from telethon._impl.mtsender import connect
from telethon._impl.session import DataCenter
from telethon._impl.tl import LAYER, abcs, functions, types
TELEGRAM_TEST_DC_2 = "149.154.167.40:443"
TELEGRAM_DEFAULT_TEST_DC = TELEGRAM_TEST_DC_2
TELEGRAM_TEST_DC = 2, "149.154.167.40:443"
TEST_TIMEOUT = 10000
@@ -22,9 +21,7 @@ async def test_invoke_encrypted_method(caplog: LogCaptureFixture) -> None:
def timeout() -> float:
return deadline - asyncio.get_running_loop().time()
sender = await asyncio.wait_for(
connect(Full(), TELEGRAM_DEFAULT_TEST_DC), timeout()
)
sender = await asyncio.wait_for(connect(Full(), *TELEGRAM_TEST_DC), timeout())
rx = sender.enqueue(
functions.invoke_with_layer(