#NEWLINE# def test_stores_file( self , tmpdir ) : #NEWLINE# #INDENT# filename = str ( tmpdir . join ( 'testfile.txt' ) ) #NEWLINE# with open ( filename , 'wb' ) as fp : #NEWLINE# #INDENT# fp . write ( b'Test File!' ) #NEWLINE# #UNINDENT# storage_dir = str ( tmpdir . join ( 'storage' ) ) #NEWLINE# storage = LocalFileStorage ( storage_dir ) #NEWLINE# storage . store ( 'foo/bar.txt' , self ) #NEWLINE# with open ( os . path . join ( storage_dir , 'foo/bar.txt' ) , 'rb' ) as fp : #NEWLINE# #INDENT# assert ( fp . read ( ) == b'Test File!' )