Class
zope.app.generations.browser.managerdetails.ManagerDetails

Show Details of a particular Schema Manager's Evolvers

This method needs to use the component architecture, so we'll set it up:

>>> from zope.app.testing.placelesssetup import setUp, tearDown
>>> setUp()

We need to define some schema managers. We'll define just one:

>>> from zope.app.generations.generations import SchemaManager
>>> from zope.app.testing import ztapi
>>> app1 = SchemaManager(0, 3, 'zope.app.generations.demo')
>>> ztapi.provideUtility(ISchemaManager, app1, 'foo.app1')

Now let's create the view:

>>> from zope.publisher.browser import TestRequest
>>> details = ManagerDetails()
>>> details.context = None
>>> details.request = TestRequest(environ={'id': 'foo.app1'})

Let's now see that the view gets the ID correctly from the request:

>>> details.id
'foo.app1'

Now check that we get all the info from the evolvers:

>>> info = details.getEvolvers()
>>> for item in info:
...     print sorted(item.items())
[('from', 0), ('info', u'<p>Evolver 1</p>\n'), ('to', 1)]
[('from', 1), ('info', u'<p>Evolver 2</p>\n'), ('to', 2)]
[('from', 2), ('info', ''), ('to', 3)]

We'd better clean up:

>>> tearDown()

Base classes

Implemented Interfaces

There are no implemented interfaces.

Attributes/Properties

Methods

Known Subclasses

There are no known subclasses.