#NEWLINE# def test_apply_template_on_contents( self ) : #NEWLINE# #INDENT# '\n        Tests that the templating engine works on string contents\n        ' #NEWLINE# contents = 'This is a {{ template }}.' #NEWLINE# defaults = { #NEWLINE# #INDENT# 'template' : 'templated file' , #NEWLINE# #UNINDENT# } #NEWLINE# ret = filemod . apply_template_on_contents ( contents , template = 'jinja' , context = { #NEWLINE# #INDENT# 'opts' : filemod . __opts__ , #NEWLINE# #UNINDENT# } , defaults = defaults , saltenv = 'base' ) #NEWLINE# self . assertEqual ( ret , 'This is a templated file.' )