def test_my_view(self): from tutorial.views import HelloWorld request = testing.DummyRequest() inst = HelloWorld(request) response = inst.hello_world() self.assertEqual(response['title'], 'Hello World')