ZopeTestCase API Reference A nicely rendered version of this document can be found at http://zope.org/Members/shh/ZopeTestCaseWiki/ApiReference Module Testing.ZopeTestCase Top-level package exposing names from contained modules 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(module=None, **kw) ZopeDocFileSuite(*paths, **kw) FunctionalDocTestSuite(module=None, **kw) FunctionalDocFileSuite(*paths, **kw) 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, Profiled.__implements__) Methods afterSetUp() beforeTearDown() afterClear() beforeSetUp() beforeClose() Module ZopeTestCase 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, TestCase.__implements__) Methods setRoles(roles, name=user_name) setPermissions(permissions, role=user_role) login(name=user_name) logout() Class FunctionalTestCase Convenience class for functional unit testing (derived from Functional and ZopeTestCase) __implements__ = (Functional.__implements__, ZopeTestCase.__implements__) Methods *See base classes* 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__ = (IPortalTestCase, IPortalSecurity, TestCase.__implements__) 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 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)