Beispiel #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')
Beispiel #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')
Beispiel #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'])
Beispiel #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')
Beispiel #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)
Beispiel #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)
Beispiel #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')