[Zope3-dev] setSite() and functional tests

Martijn Faassen faassen at infrae.com
Tue Jul 5 07:55:13 EDT 2005


Hi there,

I'm using zope.app.testing.functional.FunctionalTestCase to write 
functional, Python-level tests for a Zope 3 application, and I just ran 
into something that might or might not be a bug.

When the application code tested changed the site using setSite(), the 
next test will still run in the context of the old site. After some 
puzzling I determined that placing setSite(None) in the tearDown() 
method fixed these issues.

Perhaps this is something that can be placed in FunctionalTestCase's 
teardown itself, though?

Regards,

Martijn



More information about the Zope3-dev mailing list