common.test.services package

Submodules

common.test.services.WebServerBaseTest module

Module with Base Class for Web Service Testing

WJ Vriend.

class common.test.services.WebServerBaseTest.WebServerBaseTest(*args, **kwargs)

Bases: common.test.multicasetest.TestMultipleCases

HTML_DIR = 'html'
cases = []
convert_args(args)

make all arguments string

get_default_filename()

return the default server filename, should be overriden in derived class

get_default_server()

return the default server address, should be overriden in derived class

get_testset(case)

(derive) in derived classes this method returns the test test defined by the argument case

html_gen_class = None
init_html_gen(args)

initialize the html generator

classmethod make_testset(args=None, check=None, filename='', description='')

make a test set dict from the arguments

make_url(args)

from the given arguments make an url

setUp()

If overriden in derived classes make sure to call this method

tearDown()

clean up

test_main(test)

the main test method, this will iterate through defined test sets

write_html(filename)

write html to file

exception common.test.services.WebServerBaseTest.WebServerBaseTestError

Bases: Exception

common.test.services.WebServerBaseTest.execute_select_cached(self, query, *args, **kwargs)

override of the execute_select method, results are cached

class common.test.services.WebServerBaseTest.myRequestHandler

Bases: object

address_string()
class myServer

Bases: object

access_list = ['/']
cwd = '.'
http_config = {'domain': 'testdomain', 'bindaddr': 'testbindaddr', 'port': 9999, 'server': 'testserver'}
myRequestHandler.path = ''
myRequestHandler.requestor_is_bot = False
myRequestHandler.server = <common.test.services.WebServerBaseTest.myRequestHandler.myServer object>

Module contents