#NEWLINE# def test_upload_bad_filename( self ) : #NEWLINE# #INDENT# with open ( join ( dirname ( __file__ ) , 'data/example-1.0.tar.gz' ) ) as file_ : #NEWLINE# #INDENT# result = self . client . post ( '/pypi' , data = { #NEWLINE# #INDENT# 'file' : ( file_ , 'example-1.1.tar.gz' ) , #NEWLINE# #UNINDENT# } , headers = self . use_auth ) #NEWLINE# #UNINDENT# eq_ ( result . status_code , codes . bad_request )