Fix network test.

This commit is contained in:
Andrei Fokau 2017-10-28 13:57:58 +02:00
parent 35ade37d74
commit 84f8f6e013
No known key found for this signature in database
GPG Key ID: F2BC8AF1CE23A98E

View File

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