Refactor tests to use WebTestCase not ClientTestsCase as per issue #826