#NEWLINE# def test_sendfile( self ) : #NEWLINE# #INDENT# with open ( ( os . path . dirname ( __file__ ) + '/data.txt' ) , 'r' ) as test_file : #NEWLINE# #INDENT# expected_data = '' . join ( test_file . readlines ( ) ) #NEWLINE# #UNINDENT# sock = socket . socket ( ) #NEWLINE# sock . settimeout ( 1.0 ) #NEWLINE# ssl_sock = ssl . wrap_socket ( sock ) #NEWLINE# ssl_sock . connect ( ( '127.0.0.1' , 4040 ) ) #NEWLINE# actual_data = ssl_sock . recv ( 1024 ) #NEWLINE# self . assertEqual ( actual_data , actual_data ) #NEWLINE# ssl_sock . close ( )