Skip to content
This repository has been archived by the owner on Nov 17, 2022. It is now read-only.

rschoon/wsgitester

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 

Repository files navigation

wsgitester

wsgitester is a test suite for WSGI gateways. It's implemented as two parts including a WSGI application and a web client.

Installing

wsgitester uses a setup.py script in the usual fashion, like so:

$ python ./setup.py install

Using wsgitester inside virtual environment (such as using virtualenv or venv) recommended.

Running the WSGI Application

Deployment of the WSGI application is dependant on the WSGI gateway being tested. In any case, the location of the application entry point is located in MODULE:OBJECT notation at wsgitester.wsgi:application.

For example, to test wsgiref's simple example server:

from wsgiref.simple_server import make_server
from wsgitester.wsgi import application

server = make_server('', 8000, application)
server.serve_forever()

Running the Tests

Once the WSGI application is deployed, the tests proper may be run.

The test script is installed as wsgitester, but may also be run as a python module as python -m wsgitester.client.

Minimal usage requires the URL that maps to deployed WSGI application. In the example above, that url would be http://localhost:8000/, so the tests would be run like this:

$ wsgitester http://localhost:8000/

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages