Class n.t.FakeRequest(Componentized):

Part of nevow.testutil View Source View In Hierarchy

Known subclasses: nevow.testutil.AccumulatingFakeRequest

Implements interfaces: nevow.inevow.IRequest

No class docstring

Split Table into Classes Show Methods in One Table

Line # Kind Name Docs
58 Method __init__ Create a FakeRequest instance.
107 Method URLPath Undocumented
111 Method getSession Undocumented
115 Method write Write some data as a result of an HTTP request. The first
119 Method finish We are finished writing data.
122 Method getHeader Get a header that was sent from the network.
125 Method setHeader Set an outgoing HTTP header.
128 Method redirect Utility function that does a redirect.
131 Method getRootURL Get a previously-remembered URL.
134 Method processingFailed Undocumented
137 Method setResponseCode Set the HTTP response code.
140 Method prePathURL Undocumented
143 Method getClientIP Undocumented
146 Method addCookie Set a cookie for use in subsequent requests.
152 Method getCookie Fetch a cookie previously set.
158 Method getUser Returns the HTTP auth username.
164 Method getPassword Returns the HTTP auth password.
170 Method rememberRootURL For compatibility with appserver.NevowRequest.
176 Method isSecure Returns whether this is an HTTPS request or not.

Inherited from Componentized:

Line # Kind Name Docs
206 Method locateAdapterClass Undocumented
209 Method setAdapter Undocumented
212 Method addAdapter Utility method that calls addComponent. I take an adapter class and
222 Method setComponent Undocumented
227 Method addComponent Add a component to me, for all appropriate interfaces.
249 Method unsetComponent Remove my component specified by the given interface class.
253 Method removeComponent Remove the given component from me entirely, for all interfaces for which
267 Method getComponent Create or retrieve an adapter for the given interface.
300 Method __conform__ Undocumented

Inherited from Versioned (via Componentized):

Line # Kind Name Docs
187 Method __setstate__ Undocumented
191 Method __getstate__ Get state, adding a version number to it on its way out.
207 Method versionUpgrade (internal) Do a version upgrade.
Line # Kind Name Docs
300 Method __conform__ Undocumented
191 Method __getstate__ Get state, adding a version number to it on its way out.
58 Method __init__ Create a FakeRequest instance.
187 Method __setstate__ Undocumented
212 Method addAdapter Utility method that calls addComponent. I take an adapter class and
227 Method addComponent Add a component to me, for all appropriate interfaces.
146 Method addCookie Set a cookie for use in subsequent requests.
119 Method finish We are finished writing data.
143 Method getClientIP Undocumented
267 Method getComponent Create or retrieve an adapter for the given interface.
152 Method getCookie Fetch a cookie previously set.
122 Method getHeader Get a header that was sent from the network.
164 Method getPassword Returns the HTTP auth password.
131 Method getRootURL Get a previously-remembered URL.
111 Method getSession Undocumented
158 Method getUser Returns the HTTP auth username.
176 Method isSecure Returns whether this is an HTTPS request or not.
206 Method locateAdapterClass Undocumented
140 Method prePathURL Undocumented
134 Method processingFailed Undocumented
128 Method redirect Utility function that does a redirect.
170 Method rememberRootURL For compatibility with appserver.NevowRequest.
253 Method removeComponent Remove the given component from me entirely, for all interfaces for which
209 Method setAdapter Undocumented
222 Method setComponent Undocumented
125 Method setHeader Set an outgoing HTTP header.
137 Method setResponseCode Set the HTTP response code.
249 Method unsetComponent Remove my component specified by the given interface class.
107 Method URLPath Undocumented
207 Method versionUpgrade (internal) Do a version upgrade.
115 Method write Write some data as a result of an HTTP request. The first
def __init__(self, headers=None, args=None, avatar=None, uri='/', currentSegments=None, cookies=None, user='', password='', isSecure=False): (source)
Create a FakeRequest instance.

headers:
    dict of headers
args:
    dict of args
avatar:
    avatar to pass to the FakeSession instance
uri:
    request URI
currentSegments:
    list of segments that have "already been located"
cookies:
    dict of cookies
user:
    username (like in http auth)
password:
    password (like in http auth)
isSecure:
    whether this request represents an HTTPS url
def URLPath(self): (source)
Undocumented
def getSession(self): (source)
Undocumented
def write(self, x): (source)
Write some data as a result of an HTTP request. The first time this is called, it writes out response data.
def finish(self): (source)
We are finished writing data.
def getHeader(self, key): (source)

Get a header that was sent from the network.

Return None if the header is not present.
def setHeader(self, key, val): (source)
Set an outgoing HTTP header.
def redirect(self, url): (source)

Utility function that does a redirect.

The request should have finish() called after this.
def getRootURL(self): (source)
Get a previously-remembered URL.
def processingFailed(self, f): (source)
Undocumented
def setResponseCode(self, code): (source)
Set the HTTP response code.
def prePathURL(self): (source)
Undocumented
def getClientIP(self): (source)
Undocumented
def addCookie(self, k, v, expires=None, domain=None, path=None, max_age=None, comment=None, secure=None): (source)
Set a cookie for use in subsequent requests.
def getCookie(self, k): (source)
Fetch a cookie previously set.
def getUser(self): (source)
Returns the HTTP auth username.
def getPassword(self): (source)
Returns the HTTP auth password.
def rememberRootURL(self, url=None): (source)
For compatibility with appserver.NevowRequest.
def isSecure(self): (source)
Returns whether this is an HTTPS request or not.
API Documentation for Nevow, generated by pydoctor.