On 28.05.2008, at 09:48, Martin Aspeli wrote:

I think the main problem is that I'm not terribly familiar with how DemoStorage works, or how the Zope server (in a test case) ends up getting its database. I'm worried that I may be asking the "wrong" questions here, but to my mind, the three questions would be:

The tests get their database from Testing.custom_zodb.py

- how can I use DemoStorage to snapshot a known state and then return to it at all

See ZopeLite.sandbox

- how can I ensure that this is the storage that the Zope server sees

See sandbox.Sandboxed and the AppZapper class

- how can I actually access a server that's running inside a ZopeTestCase over a URL, i.e. ensure that it binds to a port and serves requests for the duration of the test run


And then something like urllib.urlopen(self.portal.absolute_url())

Stefan H. Holek

For more information about ZODB, see the ZODB Wiki:

ZODB-Dev mailing list  -  ZODB-Dev@zope.org

Reply via email to