#NEWLINE# def test_file_upload_errors( api_client ) : #NEWLINE# #INDENT# myfile = api_client . files . create ( ) #NEWLINE# myfile . filename = 'test.txt' #NEWLINE# myfile . data = 'Hello World.' #NEWLINE# with pytest . raises ( FileUploadError ) as exc : #NEWLINE# #INDENT# myfile . download ( ) #NEWLINE# #UNINDENT# assert ( exc . value . message == "Can't download a file that hasn't been uploaded." )