Helper for unittest

For unittest, classes are available to offer some fonctionnalities

PyramidTestCase

from anyblok_pyramid.tests.testcase import PyramidTestCase
class anyblok_pyramid.tests.testcase.PyramidTestCase

Bases: object

http(path, params=None, method='post')
includemes = ()
init_web_server()
json_xhr(url, method, params=None, headers=None, force_xhr_headers=True, status=None, expect_errors=False)
json_xhr_only(path, method, params=None)
jsonrpc(path, method, params=None)
classmethod setUpClass()
xmlrpc(path, method, params=None)

PyramidDBTestCase

Warning

this testcase destroys the test database for each unittest

class anyblok_pyramid.tests.testcase.PyramidDBTestCase(methodName='runTest')

Bases: anyblok_pyramid.tests.testcase.PyramidTestCase, anyblok.tests.testcase.DBTestCase

init_registry(function, **kwargs)

PyramidBlokTestCase

class anyblok_pyramid.tests.testcase.PyramidBlokTestCase(methodName='runTest')

Bases: anyblok_pyramid.tests.testcase.PyramidTestCase, anyblok.tests.testcase.BlokTestCase

webserver