def test_home_page__authenticated(self):
        from webidentity.views.user import home_page

        self.config.testing_securitypolicy(userid=u"dokai")
        session = DBSession()
        session.add(User("dokai", "secret", "*****@*****.**"))
        request = testing.DummyRequest()

        self.assertEquals(home_page(request), {})
    def test_home_page__anonymous(self):
        from webidentity.views.user import home_page
        from pyramid.exceptions import Forbidden

        request = testing.DummyRequest()
        self.assertRaises(Forbidden, lambda: home_page(request))