Basil Shubin wrote:
Basil Shubin wrote:
Hi friends,

I want use zope.testbrowser for testing my sites, but before write it as DocTest I want execute each statemnt interactively in python shell. I don't know any way to see where it's works, what value it returns, what error I can get and how this error should looks is python... It's why I want check it in python shell.

What the problem?

First, if execute following code in python shell:

 >>> from zope.testbrowser import Browser
 >>> browser = Browser()

but if I have use this instead above code:

  >>> from zope.testbrowser.browser import Browser
  >>> browser = Browser('http://localhost:8080/Plone')

everything works!

That's because zope.testbrowser.browser.Browser opens real HTTP connections. zope.testbrowser.Browser uses Zope 3's functional test framework.

If you want to use the test browser for functional tests in Zope 2, use Products.Five.testbrowser.Browser.

-- -- Professional Zope documentation and training
Next Zope 3 training at Camp5:

Zope maillist  -
**   No cross posts or HTML encoding!  **
(Related lists - )

Reply via email to