コード例 #1
0
ファイル: tests.py プロジェクト: jitengoyal/hallwala
	def test_my_view(self):
		from tutorial.views import hello_world
		request = testing.DummyRequest()
		response = hello_world(request)
		self.assertEqual(response.status, '200 OK')
コード例 #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')
コード例 #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'])
コード例 #4
0
ファイル: tests.py プロジェクト: pauleveritt/dcpython
 def test_my_view(self):
     from tutorial.views import hello_world
     request = testing.DummyRequest()
     response = hello_world(request)
     self.assertEqual(response['title'],
                         'Hello World')
コード例 #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)
コード例 #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)
コード例 #7
0
ファイル: tests.py プロジェクト: zenzic64/pyramid_tutorials
 def test_my_view(self):
     from tutorial.views import hello_world
     request = testing.DummyRequest()
     response = hello_world(request)
     self.assertEqual(response['title'], 'Hello World')