Public Member Functions | Public Attributes | Static Public Attributes
webtest.http.StopableWSGIServer Class Reference
Inheritance diagram for webtest.http.StopableWSGIServer:
Inheritance graph
[legend]

List of all members.

Public Member Functions

def __init__
def create
def run
def shutdown
def wait
def wrapper

Public Attributes

 application_url
 runner
 test_app

Static Public Attributes

 was_shutdown = False

Detailed Description

StopableWSGIServer is a TcpWSGIServer which run in a separated thread.
This allow to use tools like casperjs or selenium.

Server instance have an ``application_url`` attribute formated with the
server host and port.

Definition at line 45 of file http.py.


Constructor & Destructor Documentation

def webtest.http.StopableWSGIServer.__init__ (   self,
  application,
  args,
  kwargs 
)

Definition at line 55 of file http.py.


Member Function Documentation

def webtest.http.StopableWSGIServer.create (   cls,
  application,
  kwargs 
)
Start a server to serve ``application``. Return a server
instance.

Definition at line 107 of file http.py.

Run the server

Definition at line 85 of file http.py.

Shutdown the server

Definition at line 93 of file http.py.

def webtest.http.StopableWSGIServer.wait (   self,
  retries = 30 
)
Wait until the server is started

Definition at line 123 of file http.py.

def webtest.http.StopableWSGIServer.wrapper (   self,
  environ,
  start_response 
)
Wrap the wsgi application to override some path:

``/__application__``: allow to ping the server.

``/__file__?__file__={path}``: serve the file found at ``path``

Definition at line 61 of file http.py.


Member Data Documentation

Definition at line 55 of file http.py.

Definition at line 55 of file http.py.

Definition at line 55 of file http.py.

Definition at line 53 of file http.py.


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


webtest
Author(s): AlexV
autogenerated on Sat Jun 8 2019 20:32:08