[Grok-dev] Does ZopeFanstaticBrowserLayer set-up the whole grok testing machinery?
Noe Nieto
nnieto at noenieto.com
Wed Nov 16 06:46:30 UTC 2011
Hi, I have something like this in myproject/tests/tests.py
import unittest
import doctest
from zope.fanstatic.testing import ZopeFanstaticBrowserLayer
import myproject.tests
browser_layer = ZopeFanstaticBrowserLayer(myproject.tests)
def test_suite():
suite = unittest.TestSuite()
test_files = ['app.txt', ]
optionflags = ( doctest.ELLIPSIS + doctest.NORMALIZE_WHITESPACE + \
doctest.REPORT_NDIFF)
glob_vars = {'getRootFolder': browser_layer.getRootFolder}
app_test = doctest.DocFileSuite(*test_files,
optionflags = optionflags,
globs=glob_vars)
app_test.layer = browser_layer
suite.addTest(app_test)
return suite
I've been getting some weird test errors related to one of the viewlets we
are using not updating recently added content, even If I do an explicit
transaction.commit(). I'm kinda confused with this.
So, When running the tests in app.txt with zope.testrunner, does
ZopeFanstaticBrowserLayer set-up the whole grok testing machinery?
--
---
Noe Nieto
NNieto Consulting Services
M: nnieto at noenieto.com
W: http://noenieto.com
T: @tzicatl <https://twitter.com/#%21/tzicatl>
Li: Perfil en LinkedIn <http://www.linkedin.com/profile/view?id=84300665>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/grok-dev/attachments/20111116/5eb4f9ef/attachment.html
More information about the Grok-dev
mailing list