1
# -*- coding: utf-8 -*-
3
from webapp2_extras import local_app
8
class TestLocalApp(test_base.BaseTestCase):
9
def test_dispatch(self):
10
def hello_handler(request, *args, **kwargs):
11
return webapp2.Response('Hello, World!')
13
app = local_app.WSGIApplication([('/', hello_handler)])
14
rsp = app.get_response('/')
15
self.assertEqual(rsp.status_int, 200)
16
self.assertEqual(rsp.body, 'Hello, World!')
19
if __name__ == '__main__':