#NEWLINE# def mock_cinder( self ) : #NEWLINE# #INDENT# cinder_patcher = mock . patch ( 'cinderclient.client.Client' ) #NEWLINE# cinder = mock . create_autospec ( cinderclient . Client ( '1' ) ) #NEWLINE# cinder_patcher . start ( ) . return_value = cinder #NEWLINE# self . addCleanup ( cinder_patcher . stop ) #NEWLINE# return cinder