You are not logged in Log in Join
You are here: Home » Members » Stefan's Home » ZopeTestCaseWiki » ApiReference » wikipage_view

Log in
Name

Password

 
 
FrontPage »

ApiReference


ZopeTestCase API Reference

Admittedly somewhat skeletal


Module Testing.ZopeTestCase

Top-level package exposing names from contained modules. You should only ever need to import from here.

Constants

folder_name

user_name

user_password

user_role

standard_permissions

portal_name

Functions

hasProduct(name)

installProduct(name, quiet=0)

app()

close(app)

main()

_print(msg)

ZopeDocTestSuite()

ZopeDocFileSuite()

FunctionalDocTestSuite()

FunctionalDocFileSuite()

Classes

TestCase

ZopeTestCase

FunctionalTestCase

PortalTestCase

Profiled

Sandboxed

Functional

WarningsHook

Modules

ZopeLite as Zope

utils

doctest

transaction



Module ZopeLite

Lightweight replacement for the Zope module

Constants

DB

Functions

hasProduct(name)

installProduct(name, quiet=0)

app(connection=None)

sandbox(base=None)

startup()

_print(msg)


Module base

Basic infrastructure for Zope testing

Functions

app()

close(app)

Classes

TestCase


Class TestCase

Base test case for Zope testing (derived from unittest.TestCase)

__implements__ = (IZopeTestCase, IProfiled)

Methods

afterSetUp()

beforeTearDown()

afterClear()

beforeSetUp()

beforeClose()


Module ZopeTestCase

Default test case and fixture for Zope testing

Constants

folder_name

user_name

user_password

user_role

standard_permissions

Classes

ZopeTestCase

FunctionalTestCase


Class ZopeTestCase

Base test case for Zope testing (derived from base.TestCase)

__implements__ = (IZopeSecurity, IZopeTestCase, IProfiled)

Methods

setRoles(roles, name=user_name)

setPermissions(permissions, role=user_role)

login(name=user_name)

logout()


Class FunctionalTestCase

Base class for functional unit tests (derived from Functional and ZopeTestCase)

__implements__ = (IFunctional, IZopeSecurity, IZopeTestCase, IProfiled)

Methods

publish(path, basic=None, env=None, extra=None, request_method="GET", stdin=None)


Module PortalTestCase

Test case and fixture for testing CMF-based applications

Constants

portal_name

user_name

user_password

Classes

PortalTestCase


Class PortalTestCase

Base test case for CMF testing (derived from base.TestCase)

__implements__ = (IPortalSecurity, IPortalTestCase, IProfiled)

Methods

getPortal()

createMemberarea(name)

setRoles(roles, name=user_name)

setPermissions(permissions, role="Member")

login(name=user_name)

logout()


Module profiler

Profiling support

Functions

runcall(func, *args, **kw)

print_stats()

dump_stats(filename)

Classes

Profiled


Class Profiled

Profiling support mix-in for xTestCases

__implements__ = (IProfiled,)

Methods

runcall(func, *args, **kw)


Module sandbox

ZODB sandbox support

Classes

Sandboxed


Class Sandboxed

Sandbox support mix-in for xTestCases

Methods

No public methods


Module functional

Functional testing support

Classes

Functional


Class Functional

Functional testing mix-in for xTestCases

__implements__ = (IFunctional,)

Methods

publish(path, basic=None, env=None, extra=None, request_method="GET", stdin=None)


Module warnhook

Support for capturing Python warning messages

Classes

WarningsHook


Class WarningsHook

Facility to capture warnings generated by Python

Attributes

warnings

Methods

install()

uninstall()

clear()


Module utils

Utility functions to extend the test environment

Functions

setupCoreSessions(app=None)

setupZGlobals(app=None)

setupSiteErrorLog(app=None)

startZServer(number_of_threads=1, log=None)

importObjectFromFile(container, filename, quiet=0)

appcall(func, *args, **kw)