mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-04 04:00:18 +03:00
Fix network test.
This commit is contained in:
parent
35ade37d74
commit
84f8f6e013
|
@ -7,6 +7,9 @@ import telethon.network.authenticator as authenticator
|
||||||
from telethon.extensions import TcpClient
|
from telethon.extensions import TcpClient
|
||||||
from telethon.network import Connection
|
from telethon.network import Connection
|
||||||
|
|
||||||
|
TEST_SERVER_IP = '149.154.167.40'
|
||||||
|
TEST_SERVER_PORT = 443
|
||||||
|
|
||||||
|
|
||||||
def run_server_echo_thread(port):
|
def run_server_echo_thread(port):
|
||||||
def server_thread():
|
def server_thread():
|
||||||
|
@ -38,6 +41,7 @@ class NetworkTests(unittest.TestCase):
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def test_authenticator():
|
def test_authenticator():
|
||||||
transport = Connection('149.154.167.91', 443)
|
transport = Connection()
|
||||||
|
transport.connect(TEST_SERVER_IP, TEST_SERVER_PORT)
|
||||||
authenticator.do_authentication(transport)
|
authenticator.do_authentication(transport)
|
||||||
transport.close()
|
transport.close()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user