Skip to content

Commit

Permalink
- added over_the_wire.txt to long_desription
Browse files Browse the repository at this point in the history
- fixed headline types for consistent table of contents
  • Loading branch information
Michael Howitz committed Aug 21, 2010
1 parent 2a19571 commit 0bc2a3c
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 15 deletions.
4 changes: 3 additions & 1 deletion README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ Extensions for the Zope 3 testbrowser
=====================================

This package is intended to provide extended versions of the Zope 3
testbrowser. Especially those extensions that introduce dependencies to more
testbrowser_. Especially those extensions that introduce dependencies to more
external products, like lxml.

.. _testbrowser: http://pypi.python.org/pypi/zope.testbrowser

.. contents::

Extension: lxml-support
Expand Down
2 changes: 2 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ def read(*rnames):
+ '\n\n' +
read('src', 'z3c', 'etestbrowser', 'README.txt')
+ '\n\n' +
read('src', 'z3c', 'etestbrowser', 'over_the_wire.txt')
+ '\n\n' +
read('CHANGES.txt')
),
keywords = "zope3 testbrowser lxml",
Expand Down
17 changes: 8 additions & 9 deletions src/z3c/etestbrowser/README.txt
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
====================
Extended testbrowser
====================
--------------------

This package provides some extensions to Zope 3's testbrowser. It is intended
for extensions that have dependencies that we do not want to rely on in the
Zope 3 core e.g. lxml.


Requirements
============
~~~~~~~~~~~~

- lxml


etree support
=============
~~~~~~~~~~~~~

The extended test browser allows parsing of the result of a request into an
etree using lxml (if the content type is text/html or text/xml).
Expand All @@ -38,7 +37,7 @@ Example:


Strict XML
----------
++++++++++

It is possible to force the test browser to use the xml parser:

Expand All @@ -53,7 +52,7 @@ It is possible to force the test browser to use the xml parser:
[<Element {http://www.w3.org/1999/xhtml}body at ...>]

LXML unicode support
--------------------
++++++++++++++++++++

A couple of variations of libxml2 might interpret UTF-8 encoded strings
incorrectly. We have a workaround for that. Let's have a look at a view that
Expand All @@ -65,7 +64,7 @@ contains a German umlaut:
u'K\xfcgelblitz.'

Invalid XML/HTML responses
--------------------------
++++++++++++++++++++++++++

Responses that contain a body with invalid XML/HTML will cause an error when
accessing the etree or normalized_contents attribute, but will load fine for
Expand All @@ -83,7 +82,7 @@ general TestBrowser use:


Pretty printing
===============
~~~~~~~~~~~~~~~

Sometimes a normal `print` of the browsers contents is hard to read for
debugging:
Expand All @@ -103,7 +102,7 @@ the HTML (using htmllib internally):
Loading... ... Name Title Created Modified ...

HTML/XML normalization
======================
~~~~~~~~~~~~~~~~~~~~~~

The extended test browser allows normalized output of HTML and XML which makes
testing examples with HTML or XML a bit easier when unimportant details like
Expand Down
9 changes: 4 additions & 5 deletions src/z3c/etestbrowser/over_the_wire.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
=================================
Using testbrowser On the Internet
=================================
Using testbrowser on the internet
---------------------------------

The ``z3c.etestbrowser`` module exposes an ``ExtendedTestBrowser`` class that
simulates a web browser similar to Mozilla Firefox or IE.
The ``z3c.etestbrowser.browser`` module exposes an ``ExtendedTestBrowser``
class that simulates a web browser similar to Mozilla Firefox or IE.

>>> from z3c.etestbrowser.browser import ExtendedTestBrowser
>>> browser = ExtendedTestBrowser()
Expand Down

0 comments on commit 0bc2a3c

Please sign in to comment.