#NEWLINE# def testWriterMetadata( self ) : #NEWLINE# #INDENT# test_acl = 'test-acl' #NEWLINE# test_content_type = 'test-mime' #NEWLINE# mapreduce_state = self . create_mapreduce_state ( output_params = { #NEWLINE# #INDENT# self . WRITER_CLS . BUCKET_NAME_PARAM : 'test' , #NEWLINE# self . WRITER_CLS . ACL_PARAM : test_acl , #NEWLINE# self . WRITER_CLS . CONTENT_TYPE_PARAM : test_content_type , #NEWLINE# #UNINDENT# } ) #NEWLINE# shard_state = self . create_shard_state ( 0 ) #NEWLINE# ctx = context . Context ( mapreduce_state . mapreduce_spec , shard_state ) #NEWLINE# context . Context . _set ( ctx ) #NEWLINE# writer = self . WRITER_CLS . create ( mapreduce_state . mapreduce_spec , shard_state . shard_number , 0 ) #NEWLINE# writer = self . WRITER_CLS . from_json ( writer . to_json ( ) ) #NEWLINE# writer . finalize ( ctx , shard_state ) #NEWLINE# filename = self . WRITER_CLS . _get_filename ( shard_state ) #NEWLINE# file_stat = cloudstorage . stat ( filename ) #NEWLINE# self . assertEqual ( test_content_type , file_stat . content_type )