Skip to content

Commit

Permalink
Make the migration example more explicit
Browse files Browse the repository at this point in the history
I was looking at the migration example example the other day and
wondered where to specify the filename of my ftesting.zcml.  The old
code had it in the open, the new one has it in a default __init__
argument in one of the two base classes, not exactly trivial to find.

I think this can be useful to other people who migrate from old
zope.testbrowser too.
  • Loading branch information
mgedmin committed Feb 28, 2019
1 parent 9d4a5b7 commit 69788a2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CHANGES.rst
Expand Up @@ -164,12 +164,12 @@ CHANGES
zope.app.wsgi.testlayer.BrowserLayer):
"""Layer to prepare zope.testbrowser using the WSGI app."""

layer = Layer(my.package)
layer = Layer(my.package, 'ftesting.zcml', allowTearDown=True)

def test_suite():
suite = doctest.DocFileSuite('test.txt', ...)
suite.layer = layer
return TestSuite((suite,))
return suite

and then change all your tests from ::

Expand Down

0 comments on commit 69788a2

Please sign in to comment.