예제 #1
0
파일: test_bricks.py 프로젝트: Zer0-/bricks
 def testHttpException(self):
     routemap = Route(handler=MockComponent)
     app = app_from_routemap(routemap)
     req = Request.blank('/')
     req.method = 'POST'
     res = req.get_response(app)
     body = str(res.body).lower()
     self.assertTrue('forbidden' in body)
예제 #2
0
파일: test_bricks.py 프로젝트: Zer0-/bricks
 def testHttpException(self):
     routemap = Route(handler=MockComponent)
     app = app_from_routemap(routemap)
     req = Request.blank('/')
     req.method = 'POST'
     res = req.get_response(app)
     body = str(res.body).lower()
     self.assertTrue('forbidden' in body)
예제 #3
0
파일: test_bricks.py 프로젝트: Zer0-/bricks
 def testAll(self):
     routemap = Route(handler=MockComponent)
     app = app_from_routemap(routemap)
     req = Request.blank('/')
     res = req.get_response(app)
     self.assertEqual(res.body, b'hello world')
예제 #4
0
파일: test_bricks.py 프로젝트: Zer0-/bricks
 def testAll(self):
     routemap = Route(handler=MockComponent)
     app = app_from_routemap(routemap)
     req = Request.blank('/')
     res = req.get_response(app)
     self.assertEqual(res.body, b'hello world')