OpenQuizz
Une application de gestion des contenus pédagogiques
MockResponse Class Reference
Inheritance diagram for MockResponse:
Collaboration diagram for MockResponse:

Public Member Functions

def __init__ (self, headers)
 
def info (self)
 
def getheaders (self, name)
 

Detailed Description

Wraps a `httplib.HTTPMessage` to mimic a `urllib.addinfourl`.

...what? Basically, expose the parsed HTTP headers from the server response
the way `cookielib` expects to see them.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  headers 
)
Make a MockResponse for `cookielib` to read.

:param headers: a httplib.HTTPMessage or analogous carrying the headers

Member Function Documentation

◆ getheaders()

def getheaders (   self,
  name 
)

◆ info()

def info (   self)

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