Ported functional tests to webtest

This is a direct port of the functional tests to WebTest so that people will be able to compare using WebTest to using Selenium.