#NEWLINE# def test_filename_replacement( self ) : #NEWLINE# #INDENT# req = 'Example debian postinstall file' #NEWLINE# req_fn = os . path . join ( self . tmp , 'debian-postinstal-for-package-branch-{{ branch }}.postinstall' ) #NEWLINE# with open ( req_fn , 'w' ) as f : #NEWLINE# #INDENT# f . write ( req ) #NEWLINE# #UNINDENT# rename_template_files ( root_directory = self . tmp , variables = { #NEWLINE# #INDENT# 'branch' : 'auto' , #NEWLINE# #UNINDENT# } , subdirs = [ '.' ] ) #NEWLINE# fn = os . path . join ( self . tmp , 'debian-postinstal-for-package-branch-auto.postinstall' ) #NEWLINE# assert_true ( os . path . exists ( fn ) , ( '%s not in %s' % ( str ( req ) , os . listdir ( self . tmp ) ) ) )