Back to index

python3.2  3.2.2
Public Member Functions
test.test_telnetlib.WriteTests Class Reference
Inheritance diagram for test.test_telnetlib.WriteTests:
Inheritance graph
[legend]
Collaboration diagram for test.test_telnetlib.WriteTests:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def test_write

Detailed Description

The only thing that write does is replace each tl.IAC for
tl.IAC+tl.IAC

Definition at line 260 of file test_telnetlib.py.


Member Function Documentation

Definition at line 264 of file test_telnetlib.py.

00264 
00265     def test_write(self):
00266         data_sample = [b'data sample without IAC',
00267                        b'data sample with' + tl.IAC + b' one IAC',
00268                        b'a few' + tl.IAC + tl.IAC + b' iacs' + tl.IAC,
00269                        tl.IAC,
00270                        b'']
00271         for data in data_sample:
00272             telnet = test_telnet()
00273             telnet.write(data)
00274             written = b''.join(telnet.sock.writes)
00275             self.assertEqual(data.replace(tl.IAC,tl.IAC+tl.IAC), written)

Here is the call graph for this function:


The documentation for this class was generated from the following file: