def l20n(tid, **kwargs): data = tojson(kwargs) if kwargs else None return M(_L20N_TEMPLATE.render(tid=tid, data=data))
def test_tojson(inp, expected): assert filters.tojson(inp) == expected