Do a functional doctest test on the app.
========================================

Let's first create an instance of Horae at the top level:

    >>> from horae.app.app import Horae
    >>> root = getRootFolder()
    >>> root['app'] = Horae()

Run tests in the testbrowser
----------------------------

The zope.testbrowser.browser module exposes a Browser class that
simulates a web browser similar to Mozilla Firefox or IE.  We use that
to test how our application behaves in a browser.  For more
information, see http://pypi.python.org/pypi/zope.testbrowser.

Create a browser and visit the instance you just created:

    >>> from zope.app.wsgi.testlayer import Browser
    >>> browser = Browser()
    >>> browser.open('http://localhost/app')

Check some basic information about the page you visit:

    >>> browser.url
    'http://localhost/app'

    >>> '<title>Horae</title>' in browser.contents
    True
    >>> '<base href="http://localhost/app/@@index" />' in browser.contents
    True
    >>> '<body data-base="http://localhost/app">' in browser.contents
    True
