The waeup package
********************

:Test-Layer: functional

University
==========

We can watch universities in the browser.

To make sure, we can 'watch' pages, we first have to initialize out
test browser::

  >>> from zope.testbrowser.testing import Browser
  >>> browser = Browser()
  >>> browser.addHeader('Authorization', 'Basic mgr:mgrpw')
  >>> browser.handleErrors = False

We create an university object and put into the ZODB root::

  >>> root = getRootFolder()
  >>> list(root)
  []

  >>> from waeup.app import University
  >>> u = University()
  >>> root['myuniversity'] = u
  >>> list(root)
  [u'myuniversity']


Let's get the default view of a university::

  >>> browser.open('http://localhost/myuniversity')
  >>> print browser.contents
  <!DOCTYPE html ...
  ...<h1>Congratulations!</h1>...
  ...

We can also get an edit view of a university::

  >>> browser.open('http://localhost/myuniversity/edit')
  >>> print browser.contents
  <html>...
  ...<form action="http://localhost/myuniversity/edit"
  ...

The edit form contains the default value for the university name::

  >>> 'Unnamed' in browser.contents
  True

