示例#1
0
    def test_plain_without_name(self):
        from tutorial.views import TutorialViews

        request = testing.DummyRequest()
        inst = TutorialViews(request)
        response = inst.plain()
        self.assertIn(b'No Name Provided', response.body)
示例#2
0
    def test_plain_with_name(self):
        from tutorial.views import TutorialViews

        request = testing.DummyRequest()
        request.GET['name'] = 'Anderson Marques'
        inst = TutorialViews(request)
        response = inst.plain()
        self.assertIn(b'Anderson Marques', response.body)
    def test_hello(self):
        from tutorial.views import TutorialViews

        request = testing.DummyRequest()
        request.GET['name'] = 'John Doe'
        inst = TutorialViews(request)
        response = inst.plain()

        self.assertIn(b'John Doe', response.body)