Exemple #1
0
    def test_hello_world(self):
        from tutorial import hello_world

        request = testing.DummyRequest()
        response = hello_world(request)
        self.assertEqual(response.status_code, 200)
        self.assertEqual(response.status_code, 404)
	def test_hello_world(self):
		from tutorial import hello_world

		request = testing.DummyRequest()
		response = hello_world(request)
		self.assertEqual(response.status_code, 200)
		self.assertEqual(response.status_code, 404)
Exemple #3
0
    def test_hello_world(self):
        from tutorial import hello_world

        request = testing.DummyRequest()
        response = hello_world(request)
        self.assertEqual(response.status_code, 200)
        self.assertEqual(response.body, '<body><h1>Hello World!</h1></body>')
    def test_hello_world_html(self):
        from tutorial import hello_world

        request = testing.DummyRequest()
        response = hello_world(request)

        self.assertIsNotNone(response)
        self.assertRegexpMatches(response.text, r'Hello World!')