[Zope3-Users] Getting started with testbrowser

Darryl Cousins darryl at darrylcousins.net.nz
Tue Jun 27 23:35:14 EDT 2006


Hi All,

I'm having trouble getting started with testbrowser.

The problem is that zopeinstance/etc/ftesting.zcml is not being read.
Could someone help me get started here please?

The doc test - 
zopeinstance/lib/python/mypkg/browser/README.txt:

    >>> from zope.testbrowser import Browser
    >>> browser = Browser()
    >>> browser.addHeader('Authorization', 'Basic mgr:mgrpw')
    >>> browser = Browser('http://localhost/contents.html')

The testrunner - 
zopeinstance/lib/python/mypkg/browser/ftests.py:

def test_suite():
    return unittest.TestSuite((
        FunctionalDocFileSuite(
            "README.txt",
            optionflags=doctest.ELLIPSIS |
doctest.NORMALIZE_WHITESPACE),
        ))

And from zopeinstance/ I run the test:
./bin/test -vv -s mypkg/browser

I get HTTPError: HTTP Error 401: Unauthorized

Which suggests that zopeinstance/etc/ftesting.zcml is not being parsed
(I tested that by putting bad data in ftesting.zcml which produced no
error).

Best regards,
Darryl Cousins



More information about the Zope3-users mailing list