=======
CHANGES
=======

4.0.4 (2013-10-11)
------------------

- Removed the 'WebTest <= 1.3.4' version pin, fixed tests to work with modern
  WebTest versions
  (https://github.com/zopefoundation/zope.testbrowser/issues/10).


4.0.3 (2013-09-04)
------------------

- pinning version 'WebTest <= 1.3.4', because of some incompatibility and
  test failures

- Make zope.testbrowser installable via pip
  (https://github.com/zopefoundation/zope.testbrowser/issues/6).

- When ``Browser.handleErrors`` is False, also add ``x-wsgiorg.throw_errors``
  to the environment. http://wsgi.org/wsgi/Specifications/throw_errors

- Prevent WebTest from always sending ``paste.throw_errors=True`` in the
  environment by setting it to ``None`` when ``Browser.handleErrors`` is
  ``True``.  This makes it easier to test error pages.

- Made Browser.submit() handle ``raiseHttpErrors``
  (https://github.com/zopefoundation/zope.testbrowser/pull/4).

- More friendly error messages from getControl() et al:

  - when you specify an index that is out of bounds, show the available
    choices

  - when you fail to find anything, show all the available items


4.0.2 (2011-05-25)
------------------

- Remove test dependency on zope.pagetemplate.


4.0.1 (2011-05-04)
------------------

- Added a hint in documentation how to use ``zope.testbrowser.wsgi.Browser``
  to test a Zope 2/Zope 3/Bluebream WSGI application.

4.0.0 (2011-03-14)
------------------

- LP #721252: AmbiguityError now shows all matching controls.

- Integrate with WebTest. ``zope.testbrowser.wsgi.Browser`` is a
  ``Browser`` implementation that uses ``webtest.TestApp`` to drive a WSGI
  application. This this replaces the wsgi_intercept support added in 3.11.

- Re-write the test application as a pure WSGI application using WebOb. Run the
  existing tests using the WebTest based Browser

- Move zope.app.testing based Browser into ``zope.app.testing`` (leaving
  backwards compatibility imports in-place). Released in ``zope.app.testing``
  3.9.0.


3.11.1 (2011-01-24)
-------------------

- Fixing brown bag release 3.11.0.


3.11.0 (2011-01-24)
-------------------

- Added `wsgi_intercept` support (came from ``zope.app.wsgi.testlayer``).


3.10.4 (2011-01-14)
-------------------

- Move the over-the-wire.txt doctest out of the TestBrowserLayer as it doesn't
  need or use it.

- Fix test compatibility with zope.app.testing 3.8.1.

3.10.3 (2010-10-15)
-------------------

- Fixed backwards compatibility with ``zope.app.wsgi.testlayer``.


3.10.2 (2010-10-15)
-------------------

- Fixed Python 2.7 compatibility in Browser.handleErrors.


3.10.1 (2010-09-21)
-------------------

- Fixed a bug that caused the ``Browser`` to keep it's previous ``contents``
  The places are:
  - Link.click()
  - SubmitControl.click()
  - ImageControl.click()
  - Form.submit()

- Also adjusted exception messages at the above places to match
  pre version 3.4.1 messages.


3.10.0 (2010-09-14)
-------------------

- LP #98437: use mechanize's built-in ``submit()`` to submit forms, allowing
  mechanize to set the "Referer:" (sic) header appropriately.

- Fixed tests to run with ``zope.app.testing`` 3.8 and above.


3.9.0 (2010-05-17)
------------------

- LP #568806: Update dependency ``mechanize >= 0.2.0``, which now includes
  the ``ClientForm`` APIs.  Remove use of ``urllib2`` APIs (incompatible
  with ``mechanize 0.2.0``) in favor of ``mechanize`` equivalents.
  Thanks to John J. Lee for the patch.

- Use stdlib ``doctest`` module, instead of ``zope.testing.doctest``.

- **Caution:** This version is no longer fully compatible with Python 2.4:
  ``handleErrors = False`` no longer works.


3.8.1 (2010-04-19)
------------------

- Pinned dependency on mechanize to prevent use of the upcoming
  0.2.0 release before we have time to adjust to its API changes.

- LP #98396: testbrowser resolves relative URLs incorrectly.


3.8.0 (2010-03-05)
------------------

- Added ``follow`` convenience method which gets and follows a link.


3.7.0 (2009-12-17)
------------------

- Moved zope.app.testing dependency into the scope of the PublisherConnection
  class. Zope2 specifies its own PublisherConnection which isn't dependent on
  zope.app.testing.

- Fixed LP #419119: return None when the browser has no contents instead of
  raising an exception.


3.7.0a1 (2009-08-29)
--------------------

- Remove dependency on zope.app.publisher in favor of zope.browserpage,
  zope.browserresource and zope.ptresource.

- Remove dependencies on zope.app.principalannotation and zope.securitypolicy
  by using the simple PermissiveSecurityPolicy. We aren't testing security
  in our tests.

- Replaced the testing dependency on zope.app.zcmlfiles with explicit
  dependencies of a minimal set of packages.

- Remove unneeded zope.app.authentication from ftesting.zcml.

- Test dependency on zope.securitypolicy instead of its app variant.


3.6.0a2 (2009-01-31)
--------------------

- Test dependency on zope.site.folder instead of zope.app.folder.

- Remove useless test dependency in zope.app.component.


3.6.0a1 (2009-01-08)
--------------------

- Author e-mail to zope-dev rather than zope3-dev.

- New lines are no longer stripped in XML and HTML code contained in a
  textarea; fix requires ClientForm >= 0.2.10 (LP #268139).

- Added ``cookies`` attribute to browser for easy manipulation of browser
  cookies.  See brief example in main documentation, plus new ``cookies.txt``
  documentation.


3.5.1 (2008-10-10)
------------------

- Provide a work around for a mechanize/urllib2 bug on Python 2.6
  missing 'timeout' attribute on 'Request' base class.

- Provide a work around for a mechanize/urllib2 bug in creating request
  objects that won't handle fragment URLs correctly.


3.5.0 (2008-03-30)
------------------

- Added a zope.testbrowser.testing.Browser.post method that allows
  tests to supply a body and a content type.  This is handy for
  testing Ajax requests with non-form input (e.g. JSON).

- Remove vendor import of mechanize.

- Fix bug that caused HTTP exception tracebacks to differ between version 3.4.0
  and 3.4.1.

- Workaround for bug in Python Cookie.SimpleCookie when handling unicode
  strings.

- Fix bug introduced in 3.4.1 that created incompatible tracebacks in doctests.
  This necessitated adding a patched mechanize to the source tree; patches have
  been sent to the mechanize project.

- Fix https://bugs.launchpad.net/bugs/149517 by adding zope.interface and
  zope.schema as real dependencies

- Fix browser.getLink documentation that was not updated since the last API
  modification.

- Move tests for fixed bugs to a separate file.

- Removed non-functional and undocumented code intended to help test servers
  using virtual hosting.


3.4.2 (2007-10-31)
------------------

- Resolve ``ZopeSecurityPolicy`` deprecation warning.


3.4.1 (2007-09-01)
------------------

* Updated to mechanize 0.1.7b and ClientForm 0.2.7.  These are now
  pulled in via egg dependencies.

* ``zope.testbrowser`` now works on Python 2.5.


3.4.0 (2007-06-04)
------------------

* Added the ability to suppress raising exceptions on HTTP errors
  (``raiseHttpErrors`` attribute).

* Made the tests more resilient to HTTP header formatting changes with
  the REnormalizer.


3.4.0a1 (2007-04-22)
--------------------

Initial release as a separate project, corresponds to zope.testbrowser
from Zope 3.4.0a1
