#NEWLINE# def test_upload_content_type( self ) : #NEWLINE# #INDENT# '\n        Test automatic/explicit content type setting\n        ' #NEWLINE# r = UploadRequest ( self . conn , 'test_zip_key.zip' , self . dummy_data , 'bucket' ) #NEWLINE# mock = self . _mock_adapter ( r ) #NEWLINE# expected_headers = { #NEWLINE# #INDENT# 'x-amz-acl' : 'public-read' , #NEWLINE# 'Content-Type' : 'application/zip' , #NEWLINE# #UNINDENT# } #NEWLINE# mock . should_receive ( 'put' ) . with_args ( 'https://s3.amazonaws.com/bucket/test_zip_key.zip' , headers = expected_headers , data = self . dummy_data , auth = self . conn . auth ) . and_return ( self . _mock_response ( ) ) . once ( ) #NEWLINE# r . run ( ) #NEWLINE# r = UploadRequest ( self . conn , 'test_zip_key.zip' , self . dummy_data , 'bucket' , content_type = 'candy/smore' ) #NEWLINE# mock = self . _mock_adapter ( r ) #NEWLINE# expected_headers = { #NEWLINE# #INDENT# 'x-amz-acl' : 'public-read' , #NEWLINE# 'Content-Type' : 'candy/smore' , #NEWLINE# #UNINDENT# } #NEWLINE# mock . should_receive ( 'put' ) . with_args ( 'https://s3.amazonaws.com/bucket/test_zip_key.zip' , headers = expected_headers , data = self . dummy_data , auth = self . conn . auth ) . and_return ( self . _mock_response ( ) ) . once ( ) #NEWLINE# r . run ( )