

def test_xmlattr(self):
    tmpl = env.from_string("{{ {'foo': 42, 'bar': 23, 'fish': none, 'spam': missing, 'blub:blub': '<?>'}|xmlattr }}")
    out = tmpl.render().split()
    assert (len(out) == 3)
    assert ('foo="42"' in out)
    assert ('bar="23"' in out)
    assert ('blub:blub="&lt;?&gt;"' in out)

dataset/ETHPy150Open AppScale/appscale/AppServer/lib/jinja2-2.6/jinja2/testsuite/filters.py FilterTestCase.test_xmlattr/original