OPSI.web2.test.test_log module

class OPSI.web2.test.test_log.BufferingLogObserver

Bases: OPSI.web2.log.BaseCommonAccessLoggingObserver

A web2 log observer that buffer messages.

logMessage(message)
messages = []
class OPSI.web2.test.test_log.NoneStreamResource

Bases: OPSI.web2.resource.Resource

A basic empty resource.

render(req)
class OPSI.web2.test.test_log.SetDateWrapperResource(resource)

Bases: OPSI.web2.resource.WrapperResource

A resource wrapper which sets the date header.

hook(req)
class OPSI.web2.test.test_log.TestLogging(methodName='runTest')

Bases: OPSI.web2.test.test_server.BaseCase

assertLogged(**expected)

Check that logged messages matches expected format.

setUp()
tearDown()
test_logErrors()

Test the error log.

test_logNoneResponseStream()

Test the log of an empty resource.

test_logSimpleRequest()

Check the log for a simple request.