~nchohan/appscale/zk3.3.4

« back to all changes in this revision

Viewing changes to AppServer/lib/webapp2/tests/extras_local_app_test.py

  • Committer: Chris Bunch
  • Date: 2012-02-17 08:19:21 UTC
  • mfrom: (787.2.3 appscale-raj-merge)
  • Revision ID: cgb@cs.ucsb.edu-20120217081921-pakidyksaenlpzur
merged with main branch, gaining rabbitmq and upgrades for hbase, cassandra, and hypertable, as well as upgrading to gae 1.6.1 for python and go

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# -*- coding: utf-8 -*-
 
2
import webapp2
 
3
from webapp2_extras import local_app
 
4
 
 
5
import test_base
 
6
 
 
7
 
 
8
class TestLocalApp(test_base.BaseTestCase):
 
9
    def test_dispatch(self):
 
10
        def hello_handler(request, *args, **kwargs):
 
11
            return webapp2.Response('Hello, World!')
 
12
 
 
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!')
 
17
 
 
18
 
 
19
if __name__ == '__main__':
 
20
    test_base.main()