def test_add_template_filter(self):
        app = flask.Flask(__name__)
        def my_reverse(s):
            return s[::-1]
        app.add_template_filter(my_reverse)
        self.assert_('my_reverse' in  app.jinja_env.filters.keys())
        self.assert_equal(app.jinja_env.filters['my_reverse'], my_reverse)
        self.assert_equal(app.jinja_env.filters['my_reverse']('abcd'), 'dcba')
dataset/ETHPy150Open baseblack/ReproWeb/3rdParty/python/flask/testsuite/templating.py/TemplatingTestCase.test_add_template_filter/original