Back to index

python3.2  3.2.2
Public Member Functions | Public Attributes
test.test_httplib.FakeSocket Class Reference
Inheritance diagram for test.test_httplib.FakeSocket:
Inheritance graph
[legend]

List of all members.

Public Member Functions

def __init__
def sendall
def makefile

Public Attributes

 text
 fileclass
 data

Detailed Description

Definition at line 23 of file test_httplib.py.


Constructor & Destructor Documentation

def test.test_httplib.FakeSocket.__init__ (   self,
  text,
  fileclass = io.BytesIO 
)

Reimplemented in test.test_httplib.EPipeSocket.

Definition at line 24 of file test_httplib.py.

00024 
00025     def __init__(self, text, fileclass=io.BytesIO):
00026         if isinstance(text, str):
00027             text = text.encode("ascii")
00028         self.text = text
00029         self.fileclass = fileclass
00030         self.data = b''

Here is the caller graph for this function:


Member Function Documentation

def test.test_httplib.FakeSocket.makefile (   self,
  mode,
  bufsize = None 
)

Definition at line 34 of file test_httplib.py.

00034 
00035     def makefile(self, mode, bufsize=None):
00036         if mode != 'r' and mode != 'rb':
00037             raise client.UnimplementedFileMode()
00038         return self.fileclass(self.text)

def test.test_httplib.FakeSocket.sendall (   self,
  data 
)

Reimplemented in test.test_httplib.EPipeSocket.

Definition at line 31 of file test_httplib.py.

00031 
00032     def sendall(self, data):
00033         self.data += data


Member Data Documentation

Definition at line 29 of file test_httplib.py.

Definition at line 28 of file test_httplib.py.

Definition at line 27 of file test_httplib.py.


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