#NEWLINE# def test_render_json_template_all_env( tmpdir ) : #NEWLINE# #INDENT# ( template_path , template_name ) = _write_template_to_disk ( tmpdir , 'template.json' , '\n        {\n            "types_of_muffin": {\n                {% for k, v in _all_env|filter_items("MUFFIN_", True) %}\n                "{{ k.lower() }}": {{ v }}{% if loop.last == False %},{% endif %}\n                {% endfor %}\n            }\n        }\n        ' ) #NEWLINE# rendered_template = render_json_template ( template_path , template_name , ** { #NEWLINE# #INDENT# 'MUFFIN_BLUEBERRY' : 4 , #NEWLINE# 'MUFFIN_BANANA' : 7 , #NEWLINE# 'MUFFIN_CHOCOLATE' : 12 , #NEWLINE# 'DONUT_STRAWBERRY' : 9 , #NEWLINE# #UNINDENT# } ) #NEWLINE# assert ( 'types_of_muffin' in rendered_template ) #NEWLINE# assert ( rendered_template [ 'types_of_muffin' ] [ 'blueberry' ] == 4 ) #NEWLINE# assert ( rendered_template [ 'types_of_muffin' ] [ 'banana' ] == 7 ) #NEWLINE# assert ( tmpdir [ 'types_of_muffin' ] [ 'chocolate' ] == 12 )