Hi, I have something like this in myproject/tests/tests.py<br clear="all"><br>import unittest<br>import doctest<br><br>from zope.fanstatic.testing import ZopeFanstaticBrowserLayer<br><br>import myproject.tests<br><br>browser_layer = ZopeFanstaticBrowserLayer(myproject.tests)<br>
<br>def test_suite():<br> suite = unittest.TestSuite()<br><br> test_files = ['app.txt', ]<br> optionflags = ( doctest.ELLIPSIS + doctest.NORMALIZE_WHITESPACE + \<br> doctest.REPORT_NDIFF)<br>
glob_vars = {'getRootFolder': browser_layer.getRootFolder}<br> app_test = doctest.DocFileSuite(*test_files,<br> optionflags = optionflags,<br> globs=glob_vars)<br>
app_test.layer = browser_layer<br><br> suite.addTest(app_test)<br> return suite<br><br>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.<br>
<br>So, When running the tests in app.txt with zope.testrunner, does ZopeFanstaticBrowserLayer set-up the whole grok testing machinery?<br><br>-- <br><span style="color:rgb(255, 204, 102)">---</span><br>
<span style="color:rgb(204, 153, 51)">Noe Nieto</span><br>
NNieto Consulting Services<br>
M: <a href="mailto:nnieto@noenieto.com" target="_blank">nnieto@noenieto.com</a><br>
W: <a href="http://noenieto.com" target="_blank">http://noenieto.com</a><br>
T: <a href="https://twitter.com/#%21/tzicatl" target="_blank">@tzicatl</a><br>Li: <a href="http://www.linkedin.com/profile/view?id=84300665" target="_blank">Perfil en LinkedIn</a><br><br>