Beispiel #1
0
 def setUp(self):
     self.testbed = testbed.Testbed()
     self.testbed.activate()
     set_current_session(Session())
     self.testbed.init_mail_stub()
     self.testbed.init_datastore_v3_stub()
     self.testbed.init_memcache_stub()
     self.mail_stub = self.testbed.get_stub(testbed.MAIL_SERVICE_NAME)
     app = webapp2.WSGIApplication([
         Route('/<api:api>/v1/Lists/', handler=ListHandler),
         Route('/<api:api>/v1/lists/', handler=ListHandler),
         Route('/<api:api>/v1/Lists', handler=ListHandler),
         Route('/<api:api>/v1/lists', handler=ListHandler),
         Route('/<api:api>/v1/Lists/<list_id>', handler=ListHandler),
         Route('/<api:api>/v1/Lists/<list_id>', handler=ListHandler),
         Route('/<api:api>/v1/Lists/<list_id>/<item_id>', handler=ListHandler, methods='DELETE'),
         Route('/<api:api>/v1/lists/<list_id>/<item_id>', handler=ListHandler, methods='DELETE'),
         Route('/Lists/', handler=ListHandler),
         Route('/lists/', handler=ListHandler),
         Route('/Lists', handler=ListHandler),
         Route('/lists', handler=ListHandler),
         Route('/Lists/<list_id>', handler=ListHandler),
         Route('/lists/<list_id>', handler=ListHandler)
     ],
         debug=True)
     UserUtil.decorate_app(app)
     self.testapp = webtest.TestApp(app)
Beispiel #2
0
 def setUp(self):
     self.testbed = testbed.Testbed()
     self.testbed.activate()
     set_current_session(Session())
     self.testbed.init_mail_stub()
     self.testbed.init_datastore_v3_stub()
     self.testbed.init_memcache_stub()
     self.mail_stub = self.testbed.get_stub(testbed.MAIL_SERVICE_NAME)
     app = webapp2.WSGIApplication([
         ('/[uU]ser/(.*)/(.*)/', UserHandler),
         ('/[uU]ser/(.*)/(.*)', UserHandler),
         ('/[uU]ser/(.*)', UserHandler),
         ('/', RedirectHandler),
     ])
     self.testapp = webtest.TestApp(app)