[Product-Developers] Functional testing with plone.app.testing and isolation

Rafael Oliveira rafaelbco at gmail.com
Thu Jul 14 13:06:24 UTC 2011


I'm using plone.app.testing to do some functional testing using
zope.testbrowser. According to the PyPI documentation of p.a.testing I
have to call transaction.commit() whenever I add content to the Plone
Site and want to inspect it in the testbrowser. However, when I do
this it seems the changes I make to ZODB are not cleaned up when the
test layer is thorn down.

Example: I create a content item in a test and call
transaction.commit(). In another test, of another package, belonging
to a different layer, I can retrieve the same content item. All layers
and tests are wrote in the standard way prescribed in p.a.testing
documentation on PyPI.

Is this the expected behavior or am I doing something wrong ? Do I
have to manualy undo every change to ZODB if I use
transaction.commit() ?

Code: http://dev.plone.org/collective/browser/collective.cmfeditionsdexteritycompat/trunk/collective/cmfeditionsdexteritycompat

Rafael Bruno Cavalhero de Oliveira
Analista de Desenvolvimento de Sistemas - SERPRO

More information about the Product-Developers mailing list