Layers are the mechanism used by the Zope3 test runner to efficiently provide environments for tests and are documented in the lib/zope/testing.
Note that every Layer should define all of setUp, tearDown, testSetUp and testTearDown. If you don't do this, a base class' method will be called instead probably breaking something.
Preferred style is to not use the 'cls' argument to Layer class methods, as this is unambguious.
TODO: Make the Zope3 test runner handle multiple layers per test instead of one, forcing us to attempt to make some sort of layer tree. -- StuartBishop 20060619
Function | set_up_functional_test | Undocumented |
Class | LayerError | Undocumented |
Class | LayerInvariantError | Layer self checks have detected a fault. Invariant has been violated. |
Class | LayerIsolationError | Test isolation has been broken, probably by the test we just ran. |
Function | is_ca_available | Returns true if the component architecture has been loaded |
Function | disconnect_stores | Disconnect Storm stores. |
Function | reconnect_stores | Reconnect Storm stores, resetting the dbconfig to its defaults. |
Function | wait_children | Wait for all children to exit. |
Class | MockRootFolder | Implement the minimum functionality required by Z3 ZODB dependencies |
Class | BaseLayer | Base layer. |
Class | MemcachedLayer | Provides tests access to a memcached. |
Class | RabbitMQLayer | Provides tests access to a rabbitMQ instance. |
Class | DatabaseLayer | Provides tests access to the Launchpad sample database. |
Class | LibrarianLayer | Provides tests access to a Librarian instance. |
Function | test_default_timeout | Don't timeout by default in tests. |
Class | LaunchpadLayer | Provides access to the Launchpad database and daemons. |
Function | wsgi_application | This is a wsgi application for Zope functional testing. |
Class | FunctionalLayer | Loads the Zope3 component architecture in appserver mode. |
Class | ZopelessLayer | Layer for tests that need the Zopeless component architecture |
Class | TwistedLayer | A layer for cleaning up the Twisted thread pool. |
Class | BingServiceLayer | Tests for Bing web service integration. |
Class | DatabaseFunctionalLayer | Provides the database and the Zope3 application server environment. |
Class | LaunchpadFunctionalLayer | Provides the Launchpad Zope3 application server environment. |
Class | AuditorLayer | Undocumented |
Class | BingLaunchpadFunctionalLayer | Provides Bing service in addition to LaunchpadFunctionalLayer. |
Class | ZopelessDatabaseLayer | Testing layer for unit tests with no need for librarian. |
Class | LaunchpadScriptLayer | Testing layer for scripts using the main Launchpad database adapter |
Class | LaunchpadTestSetup | Undocumented |
Class | LaunchpadZopelessLayer | Full Zopeless environment including Component Architecture and |
Class | MockHTTPTask | Undocumented |
Class | PageTestLayer | Environment for page tests. |
Class | TwistedLaunchpadZopelessLayer | A layer for cleaning up the Twisted thread pool. |
Class | LayerProcessController | Controller for starting and stopping subprocesses. |
Class | AppServerLayer | Layer for tests that run in the webapp environment with an app server. |
Class | CeleryJobLayer | Layer for tests that run jobs via Celery. |
Class | CeleryBzrsyncdJobLayer | Layer for tests that run jobs that read from branches via Celery. |
Class | CeleryBranchWriteJobLayer | Layer for tests that run jobs which write to branches via Celery. |
Class | ZopelessAppServerLayer | Layer for tests that run in the zopeless environment with an appserver. |
Class | TwistedAppServerLayer | Layer for twisted-using zopeless tests that need a running app server. |
Class | YUITestLayer | The layer for all YUITests cases. |
Class | YUIAppServerLayer | The layer for all YUIAppServer test cases. |
After reconnecting, the database revision will be checked to make sure the right data is available.