#NEWLINE# def _get_object_by_name( self , download = False ) : #NEWLINE# #INDENT# swift_answer = self . answer_head_object #NEWLINE# call = 'head_object' #NEWLINE# if download : #NEWLINE# #INDENT# swift_answer = self . answer_get_object #NEWLINE# call = 'get_object' #NEWLINE# #UNINDENT# self . mock_containers . _swift_call . return_value = swift_answer #NEWLINE# obj = self . container . get_object_by_name ( 'TestObj' , download ) #NEWLINE# self . mock_containers . _swift_call . assert_called_once_with ( self . mock_region . name , call , self . container_name , 'TestObj' ) #NEWLINE# self . assertIsInstance ( obj , runabove . storage . ObjectStored ) #NEWLINE# if download : #NEWLINE# #INDENT# self . assertEqual ( obj . _data , 'data' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . assertEqual ( obj . _data , None )