#NEWLINE# def test_attach_file( self ) : #NEWLINE# #INDENT# 'should provide a way to change file field value' #NEWLINE# file_path = os . path . join ( os . path . abspath ( os . path . dirname ( __file__ ) ) , 'mockfile.txt' ) #NEWLINE# self . browser . attach_file ( 'file' , html ) #NEWLINE# self . browser . find_by_name ( 'upload' ) . click ( ) #NEWLINE# html = self . browser . html #NEWLINE# self . assertIn ( 'text/plain' , html ) #NEWLINE# self . assertIn ( open ( file_path ) . read ( ) . encode ( 'utf-8' ) , html )