'Tests if render_template from a field works,
if a custom filter was defined'

def test_render_template_field_filter(self):

    def jinja_udf(name):
        return (u'Hello    %s' % name)
    dag = DAG(u'test-dag', start_date=DEFAULT_DATE, user_defined_filters=dict(hello=jinja_udf))
    with dag:
        task = DummyOperator(task_id=u'op1')
    result = task.render_template(u'', u"{{    'world'    |    hello}}", dict())
    self.assertEqual(result, u'Hello    world')
