Create a centralized Connection class, replaces TcpTransport (#112)

This commit is contained in:
Lonami Exo
2017-08-28 21:23:31 +02:00
parent bc72e52834
commit fa22a3f848
8 changed files with 143 additions and 138 deletions

View File

@@ -5,7 +5,7 @@ import unittest
import telethon.network.authenticator as authenticator
from telethon.extensions import TcpClient
from telethon.network import TcpTransport
from telethon.network import Connection
def run_server_echo_thread(port):
@@ -38,6 +38,6 @@ class NetworkTests(unittest.TestCase):
@staticmethod
def test_authenticator():
transport = TcpTransport('149.154.167.91', 443)
transport = Connection('149.154.167.91', 443)
authenticator.do_authentication(transport)
transport.close()