Esempio 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')
Esempio 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')
Esempio 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'])
Esempio 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')
Esempio 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)
Esempio 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)
Esempio 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')