Ejemplo n.º 1
0
	def test_my_view(self):
		from tutorial.views import hello_world
		request = testing.DummyRequest()
		response = hello_world(request)
		self.assertEqual(response.status, '200 OK')
Ejemplo n.º 2
0
 def test_my_view(self):
     from tutorial.views import hello_world
     request = testing.DummyRequest()
     response = hello_world(request)
     self.assertEqual(response.status, '200 OK')
Ejemplo n.º 3
0
    def test_hello(self):
        from tutorial.views import hello_world

        request = testing.DummyRequest()
        response = hello_world(request)
        self.assertEqual('Hello View', response['name'])
Ejemplo n.º 4
0
 def test_my_view(self):
     from tutorial.views import hello_world
     request = testing.DummyRequest()
     response = hello_world(request)
     self.assertEqual(response['title'],
                         'Hello World')
Ejemplo n.º 5
0
    def test_hello_content(self):
        from tutorial.views import hello_world

        request = testing.DummyRequest()
        response = hello_world(request)
        self.assertIn(b'Go back', response.body)
Ejemplo n.º 6
0
    def test_hello(self):
        from tutorial.views import hello_world

        request = testing.DummyRequest()
        response = hello_world(request)
        self.assertEqual(response.status_code, 200)
Ejemplo n.º 7
0
 def test_my_view(self):
     from tutorial.views import hello_world
     request = testing.DummyRequest()
     response = hello_world(request)
     self.assertEqual(response['title'], 'Hello World')