Commit 071974b3 authored by Ezio Melotti's avatar Ezio Melotti

#18833: add a test for test_telnetlib. Patch by Alex Volkov.

parent b4fb1146
...@@ -75,6 +75,14 @@ class GeneralTests(TestCase): ...@@ -75,6 +75,14 @@ class GeneralTests(TestCase):
self.assertEqual(telnet.sock.gettimeout(), 30) self.assertEqual(telnet.sock.gettimeout(), 30)
telnet.sock.close() telnet.sock.close()
def testGetters(self):
# Test telnet getter methods
telnet = telnetlib.Telnet(HOST, self.port, timeout=30)
t_sock = telnet.sock
self.assertEqual(telnet.get_socket(), t_sock)
self.assertEqual(telnet.fileno(), t_sock.fileno())
telnet.sock.close()
class SocketStub(object): class SocketStub(object):
''' a socket proxy that re-defines sendall() ''' ''' a socket proxy that re-defines sendall() '''
def __init__(self, reads=()): def __init__(self, reads=()):
......
...@@ -1286,6 +1286,7 @@ Norman Vine ...@@ -1286,6 +1286,7 @@ Norman Vine
Pauli Virtanen Pauli Virtanen
Frank Visser Frank Visser
Johannes Vogel Johannes Vogel
Alex Volkov
Martijn Vries Martijn Vries
Sjoerd de Vries Sjoerd de Vries
Niki W. Waibel Niki W. Waibel
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment