def test_set_mako(self): app = webapp2.WSGIApplication() self.assertEqual(len(app.registry), 0) mako.set_mako(mako.Mako(app), app=app) self.assertEqual(len(app.registry), 1) j = mako.get_mako(app=app) self.assertTrue(isinstance(j, mako.Mako))
def test_set_mako(self): app = webapp2.WSGIApplication(debug=True) self.assertEqual(len(app.registry), 0) mako.set_mako(mako.Mako(app), app=app) self.assertEqual(len(app.registry), 1) j = mako.get_mako(app=app) self.assertTrue(isinstance(j, mako.Mako))
def mako(self): return mako.get_mako(app=self.app)
def mako(self): # Returns a Mako renderer cached in the app registry. return mako.get_mako(app=self.app)