def test_home_user_logged_in(self): from carvewithus.views import home self.config.testing_securitypolicy(userid='*****@*****.**') request = testing.DummyResource() response = home(request) self.assertEqual(response, {'user_email': '*****@*****.**'}) pass
def test_home_user_logged_out(self): from carvewithus.views import home request = testing.DummyRequest() request.context = testing.DummyResource() response = home(request) self.assertEqual(response, {'user_email': None})