OPSI.web2.test.test_wsgi module

class OPSI.web2.test.test_wsgi.TestContainer(methodName='runTest')

Bases: OPSI.web2.test.test_server.BaseCase

flushErrors(result, error)
test_calledStartResponseLate()
test_didntCallStartResponse()
test_errorfulIterator()
test_errorfulIterator2()
test_errorfulResource()
test_errorfulResource2()
test_getBlockingResource()

Test that blocking WSGI applications render properly.

test_getContainedResource()

Test that non-blocking WSGI applications render properly.

test_readAllInput()
test_readInputLineSize()

Test that readline() with a size works.

test_readInputLineSizeNegZero()

Test that calling wsgi.input.readline works with -1 and 0 and none.

test_readInputLines()
test_readInputMixed()
test_readiter()

Test that using wsgi.input as an iterator works.

test_responseCode()

Test that WSGIResource handles strange response codes properly.

test_returnList()
wait_timeout = 10.0
exception OPSI.web2.test.test_wsgi.TestError

Bases: exceptions.Exception

class OPSI.web2.test.test_wsgi.TestWSGIEnvironment(methodName='runTest')

Bases: OPSI.web2.test.test_server.BaseCase

Test that the WSGI container does everything we expect it to do with the WSGI environment dictionary.

assertEnv(uri, env, version=None)
envApp(*varnames)

Return a WSGI application that writes environment variables.

test_SERVER_PORT()

SERVER_PORT

test_SERVER_PROTOCOL()

SERVER_PROTOCOL

test_wsgi_url_scheme()

wsgi.url_scheme